-
Notifications
You must be signed in to change notification settings - Fork 465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
urql not parsing response if payload
is present in the first element (apollo federation)
#3763
Comments
payload
is present in the first elementpayload
is present in the first element (apollo federation)
|
Hey yes, apologies. I forgot to explicitly mention it is related to when using subscriptions with multipart. I will try and get a reproduction out sometime next week. It is just that the first response fails when it is wrapped with "payload" for multipart, however after the first response urql can handle the response when it is wrapped with "payload". |
You can probably reproduce this in our unit tests, if that's more convenient: https://github.com/urql-graphql/urql/blob/e850c988aaa0dc4e0707dbb589c4bf65bc0b473f/packages/core/src/utils/result.test.ts This doesn't have much to do with the multipart transport protocol, but instead with the "Incremental Delivery" spec that defines how incremental (defer/stream) results are formatted and delivered to clients. None of the spec, as it's currently been submitted, requires the I suspect that Apollo has basically stuck to one version on the server (which likely differs, for example, what GraphQL Yoga stuck to). You can specifically see that the But if this can't be traced back to the Apollo Federation spec-addition, then it'd be best to capture what the result format is from your actual server, compare that to the tests, track the changes, and document the failure/difference |
Describe the bug
While testing our backend with urql, we noticed that the urql code seemed to work only if the first element did not contain payload. (see attached screenshot). This is related to subscriptions when using multipart.
It seems that after result is not null,
payload
can be used as the root elementRelated To: #3499
Reproduction client
Reproduction
Reproduction Is In Description, don't have a backend available to share atm
Urql version
@urql/core, 5.1.1
Validations
The text was updated successfully, but these errors were encountered: