Could anyone please point me to a comprehensive ex...
# orm-help
p
Could anyone please point me to a comprehensive example for using nested mutations for create. I have three types, Person, Contact and Login. Person must have Contact. Login must have Person. So if I create a Login, I want to create the Person, and the Contact in the same operation. Using js examples from GraphQL and Prisma docs I keep getting errors, or null values reported on the mutation, or told that "create" is not recognised. Is there an example that shows two or three types in the schema, prisma model and the js, so I can just sanity check please? I am new to GraphQL and Prisma and to be honest just feel like going back to doing this in REST, as I have been at this for a couple of days amd
c
what I do, in a case like this
is write a sample mutation/query doing what you want exactly, in the dev playground
cause it has autocomplete, etc for every thing you can do
and how you write it there pretty much transfers 1 to 1 to what you put in the code
so once you do a sample one that works just copy and paste it
you can even write it with variables, put the variables in the bottom of the playground