Skip to content

[GraphQL] Fix type for subresource#1702

Merged
dunglas merged 4 commits into
api-platform:masterfrom
alanpoulain:fix/graphql-iri-subresource
Feb 12, 2018
Merged

[GraphQL] Fix type for subresource#1702
dunglas merged 4 commits into
api-platform:masterfrom
alanpoulain:fix/graphql-iri-subresource

Conversation

@alanpoulain

@alanpoulain alanpoulain commented Feb 12, 2018

Copy link
Copy Markdown
Member
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets api-platform/api-platform#535
License MIT
Doc PR

Nested mutations are not a part of the specification. See:

@dunglas

dunglas commented Feb 12, 2018

Copy link
Copy Markdown
Member

Thanks @alanpoulain

@dunglas
dunglas merged commit 8570146 into api-platform:master Feb 12, 2018
@alanpoulain
alanpoulain deleted the fix/graphql-iri-subresource branch February 12, 2018 15:41
@Rebolon

Rebolon commented Feb 19, 2018

Copy link
Copy Markdown

Hi, I understand your choice and difficulties to implement nested mutations. But i find this rather sad. Nested mutations are a solution to solve multiple HTTP call problems from client. A project like GraphCool has choose to implement this feature in 2016/10: https://blog.graph.cool/improving-dx-with-nested-mutations-698c508339ca

Hope it will exists one day in api-platform

@soyuka

soyuka commented Feb 19, 2018

Copy link
Copy Markdown
Member

Something like batch operations may be more suitable for this particular issue, see #1645

@Rebolon

Rebolon commented Feb 19, 2018

Copy link
Copy Markdown

i have to investigate on batch operations, but to my mind batch are for recurrent operations of the same kind, here operations can be over different object. I'll give it a try (if i find enough documentation about it :)
)

hoangnd25 pushed a commit to hoangnd25/core that referenced this pull request Feb 23, 2018
* Add a depth variable in SchemaBuilder

* Pagination should not be used for input

* String type (IRI) if depth > 0 (= subresource) for input

* Add a test for a mutation with a subresource
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants