-
-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow variables inference in GraphQLRequest (#1081)
* fix: allow variables inference in GraphQLRequest I noticed that the return type of a `graphql.query<T, N>...` call is `GraphQLHandler<GraphQLRequest<any>>` - it's not propagating the variables generic parameter into the return type. I assume this wasn't intentional. This change annotates the constructor of the `GraphQLHandler` class with the correct generic parameters, so the return type should now be `GraphQLHandler<GraphqlRequest<N>>`. * test(graphql): add variables inference typing test Co-authored-by: Artem Zakharchenko <kettanaito@gmail.com>
- Loading branch information
1 parent
ddbc5a7
commit 6e7ec28
Showing
2 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters