lighthouse
lighthouse copied to clipboard
Nested `create` and `update` operations for mutations with MorphTo relationships
It should be possible to create or update models that are related through a MorphTo relationship when issuing a mutation.
The Problem
The create
and update
operations can not be structured in a straightforward
manner with the current capabilities of GraphQL.
We can either wait for the GraphQL spec to support polymorphic input types natively or come up with a workaround.
https://github.com/graphql/graphql-spec/issues/114
Current related PR: https://github.com/graphql/graphql-spec/pull/733