Skip to content
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: Missing cache result fields for fields with @client directives #6273

Closed
nathanschwarz opened this issue May 13, 2020 · 3 comments
Closed

Comments

@nathanschwarz
Copy link

Hello there,

since @apollo/client@3.0.0-beta.44 all the @client directives on fields throw a MissingFieldError when trying to render on the server (using @apollo/react-ssr@4.0.0-beta.1)

When downgrading to @apollo/client@3.0.0-beta.41 it works as usual.

Does @apollo/client@3.0.0-beta.44 introduced a breaking change on the way it handles @client directives ?

@vincicat
Copy link

After some digging, I found the source: devs removed @client directive without saying it in migration guide.

See PR #5982 for detail.

@hwillson
Copy link
Member

We did remove the option to pass @client directives into the link chain, which is documented in the link section of the Migration Guide. It isn't clear though if that is the issue being originally reported here? @nathanschwarz if this isn't your problem, could you provide more details, such as a small runnable reproduction? Closing for now, but happy to re-open if this issue isn't resolved.

@nathanschwarz
Copy link
Author

It seems that the bug was removed with @apollo/client@3.0.0-beta.50.

Anyway, I wasn't using the old apollo-link-state API, but the one in the core (just to clarify, I can guess that apollo-link-state is still implemented in the core). It seems that @client directives were sent to server anyway even with local resolvers setup.

Thanks anyway !

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants