executeOperation
: Support TypedDocumentNode
generic type
#7579
Unanswered
jangerhofer
asked this question in
Ideas
Replies: 1 comment 1 reply
-
@jangerhofer go for it, that'd be great! Happy to offer guidance as needed. Presumably adding Some tests which show the type correctness of using a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Howdy, @glasser?
As @tobiasdiez (among others) commented,
ApolloServer.executeOperation
support for theTypedDocumentNode
format1 would advance type-safety for all who usegraphql-code-generator
alongside integration tests. I see that you both madeexecuteOperation
generic over theTypedQueryDocumentNode
type fromgraphql-js
in #6960 and consideredTypedDocumentNode
support around the same time. If I am not mistaken, such support never landed!I am eager to take a stab at making
apollo-server
play nicely with thegraphql-code-generator
standard in tests, but want to check(a) that you're still in favor of this change 😄 and
(b) whether you have any particular opinion about how to approach implementation.
Are you willing to offer guidance?
Footnotes
Specifically, support for inferring the
variables
parameter & return type ofexecuteOperation
based on the type of the GQL document passed as thequery
parameter. ↩Beta Was this translation helpful? Give feedback.
All reactions