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

Apollo Client Codegen does not take into account Field Policies (Apollo Client 3.0) #2044

Open
seanemmer opened this issue Jul 17, 2020 · 3 comments

Comments

@seanemmer
Copy link

seanemmer commented Jul 17, 2020

Intended outcome:

Types generated by apollo client:codegen should take into account transformations resulting from Field Policies

Actual outcome:

Types generated by apollo client:codegen do not reflect transformations resulting from Field Policies.

How to reproduce the issue:

Create a 'read' Field Policy that changes the type of a given cached field. The codegen type will not reflect this.

Versions

Tooling: 2.30.1
Apollo Client: 3.0.0

@seanemmer
Copy link
Author

Example Field Policy:

image

@kaleb
Copy link

kaleb commented Sep 3, 2020

You can add a dummy gql tag with the type extension using sdl in that file.

@seanemmer
Copy link
Author

Any signs of life from the Apollo Team on this? Is codegen still supported or should I be migrating to GraphQL Code Generator?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants