-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Resolver args type not correctly propagated from GraphQLObjectType
#2481
Comments
GraphQLObjectType
GraphQLObjectType
Was added in DefinitelyTyped/DefinitelyTyped#32694 Motivation for removal graphql#2481
Was added in DefinitelyTyped/DefinitelyTyped#32694 Motivation for removal graphql#2481
Was added in DefinitelyTyped/DefinitelyTyped#32694 Motivation for removal graphql#2481
Was added in DefinitelyTyped/DefinitelyTyped#32694 Motivation for removal #2481
@harrysolovay Thanks for reporting 👍 As for the long term solution, there is a discussion about adding more complex TS typings in #2188 |
I'm running into issues relating to the inference of arguments and return types from within a given
GraphQLObjectType
.My query interface looks like this:
And my schema like this:
The
tweets
query is meant to accept no arguments, whereas theuser
query accepts the user's id. So I specify the 3rd generic argument, which I hoped would map to the correct fields:Although I expect for those types to flow through to their respective resolver arguments, they do not. Instead, the entire map flows through:
While I could provide a union of the two types, this lacks specificity, and I was wondering if there's a better way?
Additionally, (perhaps this merits another issue), the resolver return types aren't inferred either (I have to manually append the return signature).
Any help or advice would be greatly appreciated! Thank you!
Kind regards,
Harry
The text was updated successfully, but these errors were encountered: