Make Update mutations backward compatible
See original GitHub issueProblem
I am SUPER frustrated that in 2.6.x, all of a sudden, the update syntax changed. This requires a major change to my entire client code base, and so i am simply not going to upgrade from 2.5.1 for a while.
Most of the time i just want to set a new value, esp for strings, so can we default to set.
Instead of passing down:
{
field1: value,
submodel: {
update: {
subfield1: value
}
}
I have to now pass down:
{
field1: { set value },
submodel: {
update: {
subfield1: { set: value }
}
}
}
Suggested solution
Please support the old syntax, and implicitly take it as “set”.
Alternatives
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
How to extend or update a resolver to allow backwards ...
My problem is that I have to maintain backward compatibility that means I've been using until now preferredContact and the new field is ......
Read more >Changing GraphQL Types Without Breaking Changes
Even if your GraphQL API is only internally facing, most type changes are costly to do in a backwards compatible way. Extra thought...
Read more >Upsert Mutations - GraphQL - Dgraph
Upsert Mutations · The default value of uspert will be false , for backward compatibility. · The current behavior of Add and Update...
Read more >Detect Breaking Changes in Your GraphQL Schema ... - Medium
This implies that each change must be checked for backwards compatibility. In this blog post we automate this check for each pull request...
Read more >GraphQL schema basics
The schema also specifies exactly which queries and mutations are available for ... Most additive changes to a schema are safe and backward...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What version are you testing this with @srisub1? 2.6.x got two patch releases 2.6.1 and 2.6.2 as these changes were unwanted and accidental.
Using 2.6.2 or any of the 2.7.x releases you should not observe these differences any more.
Yeah this does seem to be duplicate of https://github.com/graphql-nexus/nexus-plugin-prisma/issues/830. Pleas follow that issue, it has gained quite a lot of upvotes so it is likely to be addressed. Thanks!
I am going to close this here.