I have the following situation: I have a User, each user has a Inventory. I'm struggling to declare the user's inventory in the Mutation "CreateUser". Here is the following mutation for creating the user:
mutation Create{
addUser(UserData:{name:"Shibunika",age:21}
}
I'm trying to declare the user's inventory in this mutation, I expected something like
mutation Create{
addUser(UserData:{name:"Shibunika",age:21,inventory:{'item1':45,'item2':25}
}s
these number are the quantity of each item. How do I define these inputs in graphene? Would you gently show me a schema for this?
inventory
is expecting is derived fromInputObjectType
and NOTObjectType
.... – Jacynth