-
Notifications
You must be signed in to change notification settings - Fork 36
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
Upgrading to 0.11 doesn't trigger ApolloLink properly #348
Comments
Yes, with See the #274. What that means, though, is that You could get around that by creating your own For our implementation, see apollo-client-nextjs/packages/experimental-nextjs-app-support/src/ApolloNextAppProvider.ts Lines 48 to 66 in da4c6f8
And here's the comment on apollo-client-nextjs/packages/client-react-streaming/src/ManualDataTransport/ManualDataTransport.tsx Lines 16 to 21 in cee4e66
|
Thank you. That seems to work. Though I was getting the following error:
So, I changed the import of ApolloClient and InMemoryCache to come from |
At this point, those are equal and it should not be a problem. We just have that warning in place in case those packages ever deviate from each other. Right now we mostly want to prevent that you use the ones from If you want to keep the ones from ApolloNextAppProvider.info = bundle; in the last line of the snipped above, which updates that package name information.
{
pkg: "@apollo/experimental-nextjs-app-support",
client: "ApolloClient",
cache: "InMemoryCache",
}; |
We're attempting to upgrade
@apollo/experimental-nextjs-app-support
and running into issues. It appears we can upgrade@apollo/client
to 3.11.4 without any problems, and upgrading@apollo/experimental-nextjs-app-support
to 0.10.1 still works. But, upgrading to 0.11.x is resulting in a custom ApolloLink from running properly.We are using
apollo-link-scalars
to transform specific graphql fields before they get cached in the apollo client.https://github.com/eturino/apollo-link-scalars
Example:
Before version 0.11, SSR would convert a string date (e.g. "2024-08-19") into a JavaScript Date object, and then the result would be serialized for the client. Then the client would read the query from the cache and have the JavaScript Date object available in the data returned.
However, after upgrading to 0.11, SSR still converts the string date into a JavaScript Date object and serializes the query results as it always has, but after the client hydrates, the date is not converted back to a Date object and only exists as a string (e.g. "2024-08-19T00:00:00Z") from the SSR serialization.
The text was updated successfully, but these errors were encountered: