trying to create mutation ``` const DishUpdate = ...
# prisma-whats-new
m
trying to create mutation
Copy code
const DishUpdate = gql`mutation updateDish($id:ID!, $duration: Number) { 
  updateDish(id: $id, duration: $duration) {
    id,
    duration: duration
  }
}`;
using aApollClient get error
Error: GraphQL error: Variable '$duration' cannot be non input type 'Number'
1 - I understand I need to define some input type, where I can see example to define input type 2 - insted of simple scallar want to pass complex data object, any known example for that?
n
@mulyoved Hey!
m
Hi 🙂
n
1 - in your Playground in the Console, you can see the green Docs button to the right. There you can find the
createDish
mutation where you can find the input type of the
duration
argument. It's probably
Int
m
missed the green docs tabs, will check
n
👍
@mulyoved did that help? 🙂
m
Yes, still need to work the code throgh this but seem I have a direction, thanks
👍 1