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.
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:
The sections before it describe usage with the generated
gql
function created by graphql-codegen, so this statement makes it seem likeTypedDocumentNode
with the manual typing is something that should be used instead of the generatedgql
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.