Azure / data-api-builder

Data API builder provides modern REST and GraphQL endpoints to your Azure Databases and on-prem stores.
https://aka.ms/dab/docs
MIT License
930 stars 193 forks source link

Support Nested GraphQL Mutations #990

Open sajeetharan opened 1 year ago

sajeetharan commented 1 year ago

Summary

This RFC outlines a proposal to implement support for nested Graphql Mutations.Nested mutations is the ability to perform mutations on a type other than the root type in GraphQL and how to define circular dependency schema files

Motivation

Most developers find it easier to think of "changes" in a sequential fashion. Databases can and do perform many update/insert/delete transactions concurrently. Any modern databases exposing any API (including GraphQL) has to be ready for concurrently arriving requests as well as nested mutations

Functional Specifications

Circular Reference

Nested Mutation Types

Referene

Nested mutations have been https://github.com/graphql/graphql-spec/issues/252 but not yet approved

aaronpowell commented 1 year ago

Linking #906 as it has context on an outstanding bug that this poses

aaronpowell commented 1 year ago

https://hasura.io/docs/latest/schema/common-patterns/data-modeling/many-to-many/ is how Hasura exposes relationships (specifically many-to-many as that's the cause of #906) and could serve as inspiration for how the structures could be defined.

aaronpowell commented 1 year ago

This is probably a duplicate of #479