Weakky / ra-data-opencrud

A react-admin data provider for Prisma and GraphCMS
MIT License
159 stars 45 forks source link

Question: How can I define nested mutation? #33

Open mtheolog opened 5 years ago

mtheolog commented 5 years ago

Suppose i have the following schema: type User{ id: ID! @unique age: Int email: String! @unique name: String! posts: [Post!]! }

type Post { id: ID! @unique title: String! published: Boolean! author: User! } How can I implemented a nested mutation like: mutation { createPost(data: { title: "This is a draft" published: false author: { create: { email: "athina@example.com" name:"athina" } } }) { id title published author { name email } } }

5achinJani commented 4 years ago

14 there's closed PR for this. It isn't merged yet so you can create a fork and merge this in your fork and use this.