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

[Documentation] Improve clarity on TypedDocumentNode in the "Using TypeScript" doc #12007

Open
jerelmiller opened this issue Aug 16, 2024 · 0 comments

Comments

@jerelmiller
Copy link
Member

Link: https://www.apollographql.com/docs/react/development-testing/static-typing/#using-typeddocumentnode

This section is last in the doc and starts with the phrase:

This technique enables us to modify the useQuery example above to use a type inference:

The sections before it describe usage with the generated gql function created by graphql-codegen, so this statement makes it seem like TypedDocumentNode with the manual typing is something that should be used instead of the generated gql function. If anything, we should consider reversing the sections and start with the manual typing approach followed by graphql codegen to show how types can be improved by automatically generating them.

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

No branches or pull requests

1 participant