You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we're currently trying to get batched queries (apollo-link-batch-http) to work with automatic persisted queries (apollo-link-persisted-queries) and apollo server 2.0 RC.
Our Apollo Client application is sending initially two batched requests:
{
"errors":[
{
"message":"PersistedQueryNotFound",
"extensions":{
"code":"PERSISTED_QUERY_NOT_FOUND",
"exception":{
"stacktrace":[
"PersistedQueryNotFoundError: PersistedQueryNotFound",
" at Object.<anonymous> (C:\\Test\\Server\\node_modules\\apollo-server-core\\src\\runHttpQuery.ts:189:16)",
" at Generator.next (<anonymous>)",
" at fulfilled (C:\\Test\\Server\\node_modules\\apollo-server-core\\dist\\runHttpQuery.js:4:58)",
" at <anonymous>",
" at process._tickDomainCallback (internal/process/next_tick.js:228:7)"
]
}
}
}
]
}
Please note that there is only one response although two batched requests have been made.
Within a Query-component of React Apollo we now receive an error:
Error: server returned results with length 1, expected length of 2
at Object.next (webpack-internal:///./node_modules/apollo-link-batch/lib/batching.js:98:33)
at notifySubscription (webpack-internal:///./node_modules/zen-observable/lib/Observable.js:126:18)
at onNotify (webpack-internal:///./node_modules/zen-observable/lib/Observable.js:161:3)
at SubscriptionObserver.next (webpack-internal:///./node_modules/zen-observable/lib/Observable.js:215:7)
at eval (webpack-internal:///./node_modules/apollo-link-batch-http/lib/batchHttpLink.js:97:30)
I'm not completely certain, but I assume this is related to only receiving one response.
Expected behavior (as far as I understand it)
Batched request with two persisted parts is beingt sent
Server doesn't know about both and responds with two batched "PersistedQueryNotFound" messages
@ralmo Thank you for flagging the issue! It's definitely an bug. If you have a breaking test case, I'd love to incorporate it into the testsuite and make sure we can fix it for the next release
@evans: glad to help. I don't have any tests into that direction, though, as I'm only just beginning to get comfortable with those advanced graphql features.
Hello everyone,
we're currently trying to get batched queries (apollo-link-batch-http) to work with automatic persisted queries (apollo-link-persisted-queries) and apollo server 2.0 RC.
Our Apollo Client application is sending initially two batched requests:
The server response is as follows:
Please note that there is only one response although two batched requests have been made.
Within a Query-component of React Apollo we now receive an error:
I'm not completely certain, but I assume this is related to only receiving one response.
Expected behavior (as far as I understand it)
Note: this might somewhat be related to #941 ?
The text was updated successfully, but these errors were encountered: