-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
SSR: ssr: false and variables in queries #1163
Comments
@curio77 can you reproduce this issue with only Apollo Client (i.e. without using react-apollo |
Drat, completely forgot about |
OK, so I've refactored this to do away with return this.context.apollo.query({
query: ItemsQuery,
variables: {
root: this.props.root || null,
limit: 50,
offset: null,
},
}).then(data => this.setState({ data })); This yields the same, so I think this is an
|
BTW, I load my queries via |
This seems related to #1183: just as happens there, I've now looked at the chatter between client and GraphQL backend via Wireshark and confirmed that the request goes out including variables and the expected response gets returned, but regardless of this, the error gets thrown and my component gets no data. |
This issue is resolved for me with v0.8.1. |
I have a setup using ApolloClient (v0.6.0; v0.7.1 behaves identically) in conjunction with React, Redux, and SSR. With this I noticed that if I have a query decorating a component like this:
with the query being
then things work as intended with SSR enabled.
However, adding
ssr: false
to the options gives the following — obviously unfounded — error:I.e., this only happens client-site if SSR is disabled for the query, but not server-side (with SSR enabled).
I'm clueless as to why this might be and suspect a bug in ApolloClient.
The text was updated successfully, but these errors were encountered: