-
Notifications
You must be signed in to change notification settings - Fork 16
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
TypeScript: Property 'mergeInfo' is missing in type 'GraphQLResolveInfo' but required in type '{ mergeInfo: MergeInfo; } #19
TypeScript: Property 'mergeInfo' is missing in type 'GraphQLResolveInfo' but required in type '{ mergeInfo: MergeInfo; } #19
Comments
@rwieruch are you TypeScript acknowledged? I've being using for a while, but I'm no expert. To give you context: this library has currently no typings at all, and I don't even know where to start with typing cause this library has no direct relation with GraphQL. Take combineResolvers: (...args: any[]) => Promise<any> The We could use generics an inference to help typing resolver implementations from whatever is arguments are passed into
|
@lucasconstantino thanks for taking the time to respond! There are types for your library: https://www.npmjs.com/package/@types/graphql-resolvers Someone must have published them :-) I was just wondering if this was a bug with the published types. Seems like it didn't come from you. Just wanted to leave this issue here if anyone stumbles upon it as well and would be open to create a PR for it. Maybe I am just wrong and the typings from @types/graphql-resolvers are already alright. I am no TS expert, so I would love as well if someone would take over here :) |
Types have been published. Can you try it again? |
Not 100% sure if it's the same issue, but it looks very related:
Getting this with:
|
@nephix I'm having this same problem right now, did you figure out how to fix it ? |
@GerardoAGL96 i stopped using this lib and wrote my own TS version of it. Don't have access to the code anymore though, sorry But if you take a look at the source of this lib it shouldn't be hard. That's at least how I did it |
I have this issue and bypassed it for the day by editing the type in the index.d.ts file provided by @types/graphql-resolvers |
I am using this library and for the last year I loved it. Now I am using it in a TypeScript GraphQL Server with
@types/graphql-resolvers
.All my types are generated via
graphql-codegen
. WithoutcombineResolvers
, all types evaluate just fine. If I am using a combined resolver though, I get:Whereas I think the crucial part is:
Could it be that the 4th argument of a resolver isn't evaluated in the TS version of this library?
Something related in another library: https://github.com/prisma-labs/graphql-middleware/pull/29/files
The text was updated successfully, but these errors were encountered: