🐛: Mutations with @defer only responds with the first part
See original GitHub issueTo clarify, this is happening from a non-federated AS4 instance, not router.
Intended outcome:
Using the useMutation
hook with a mutation with @defer
results in only the first chunk loading.
For example, given a server responding with:
---
content-type: application/json; charset=utf-8
{"hasNext":true,"data":{"makePayment":{"id":"1afa84cc-26a5-4820-a496-33c8366e03cd","__typename":"MakePaymentResult"}}}
---
content-type: application/json; charset=utf-8
{"hasNext":false,"incremental":[{"path":["makePayment"],"data":{"paymentStatus":{"__typename":"PaymentSuccess","id":"2a3a1ddd-81e1-4535-8a9c-e8dc1ce38026","billedAmount":39.854330085558395},"__typename":"MakePaymentResult"}}]}
-----
Only
{"makePayment":{"id":"1afa84cc-26a5-4820-a496-33c8366e03cd","__typename":"MakePaymentResult"}
is reported in the data
object.
Actual outcome:
Mutations update with the correct data, same as with useQuery
which works as expected.
How to reproduce the issue: Example Repo: https://github.com/lleadbet/graphql-galaxy-demo
Versions
System:
OS: macOS 12.6
Binaries:
Node: 16.16.0 - ~/.volta/tools/image/node/16.16.0/bin/node
Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
npm: 8.11.0 - ~/.volta/tools/image/node/16.16.0/bin/npm
Browsers:
Chrome: 107.0.5304.110
Firefox: 106.0.5
Safari: 16.0
npmPackages:
@apollo/client: ^3.7.1 => 3.7.1
Issue Analytics
- State:
- Created 10 months ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Mutations in Apollo Client - Apollo GraphQL Docs
To execute a mutation, you first call useMutation within a React component and pass it the mutation you want to execute, like so:...
Read more >Fixes support for defer in mutations #10368 - GitHub
This PR fixes the behavior of mutations when combined with @defer. ... issues. 🐛 : Mutations with @defer only responds with the first...
Read more >Mutations - Sanity.io
deferred is the fastest way to write. It bypasses the real time indexing completely, and should be used in cases where you are...
Read more >BRCA Testing, Prophylactic Mastectomy, and ... - Aetna
A first-, second-, or third-degree blood relative who has a known BRCA1 or BRCA2 mutation, where the results will influence clinical utility (e.g.,...
Read more >GraphQL Code Libraries, Tools and Services
Mutations : Relay lets you mutate data on the client and server using GraphQL mutations ... First-class hooks API; ⚖️ Tiny bundle: only...
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
To clarify, this is happening from a non-federated AS4 instance, not router
Opened the router issue here: https://github.com/apollographql/router/issues/2099