nuwave / nuwave/lighthouse

Nested `create` and `update` operations for mutations with MorphTo relationships

Open
#900 1 comment 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
3.5k
Forks
468
Avg merge
3h 9m
Merged PRs (30d)
2

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named in the issue. Start by reviewing the existing mutation handling for create and update operations and how MorphTo relationships are represented, then read GraphQL spec issue 114. Done means there is an agreed, implementable approach for nested polymorphic create and update mutations.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, laravel, php
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.