You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using Apollo's GraphQL solutions for a while and I find them amazing, really good work. 👍
So I was updating some dependencies in a project and I got this type error that wasn't occurring before the update. 🐛
TS2322: Type '{ Query: { user: (obj: any, args: IUserResolverArgs) => Promise<IGQLUser | null>; }; }' is not assignable to type 'IResolvers'.
Property 'Query' is incompatible with index signature.
Type '{ user: (obj: any, args: IUserResolverArgs) => Promise<IGQLUser | null>; }' is not assignable to type '(() => any) | IResolverObject | GraphQLScalarType'.
Type '{ user: (obj: any, args: IUserResolverArgs) => Promise<IGQLUser | null>; }' is not assignable to type 'GraphQLScalarType'.
Property 'name' is missing in type '{ user: (obj: any, args: IUserResolverArgs) => Promise<IGQLUser | null>; }'.
Specifications
Version: 1.1.0
Suggested solution
Use the graphql-jsimplementation like in the previous versions.
I continue to run into this as well. Turning strictFunctionTypes off gets rid of the error, but it's clearly a hack. This seems related to DefinitelyTyped/DefinitelyTyped#21359, which I still feel is unresolved. If TS can't be used with strict flags enabled, I think the typings may need to be firmed up.
I've been using Apollo's GraphQL solutions for a while and I find them amazing, really good work. 👍
So I was updating some dependencies in a project and I got this type error that wasn't occurring before the update. 🐛
Expected Behavior
This code to not error.
Actual Behavior
Error
Specifications
1.1.0
Suggested solution
Use the
graphql-js
implementation like in the previous versions.The text was updated successfully, but these errors were encountered: