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 got this error when I tried to execute this code. Do you have any idea?
src/index.ts(40,49): error TS2345: Argument of type '{ typeDefs: string; resolvers: { Query: { addCell: (: any, { type }: { type: any; }) => Prom...' is not assignable to parameter of type 'IExecutableSchemaDefinition'.
Types of property 'resolvers' are incompatible.
Type '{ Query: { addCell: (: any, { type }: { type: any; }) => Promise; }; Subscription: ...' is not assignable to type 'IResolvers'.
Property 'Subscription' is incompatible with index signature.
Type '{ newCell: { subscribe: (: any, { type }: { type: any; }) => AsyncIterator<{}>; }; }' is not assignable to type 'GraphQLScalarType | IResolverObject | (() => any)'.
Type '{ newCell: { subscribe: (: any, { type }: { type: any; }) => AsyncIterator<{}>; }; }' is not assignable to type '() => any'.
Type '{ newCell: { subscribe: (_: any, { type }: { type: any; }) => AsyncIterator<{}>; }; }' provides no match for the signature '(): any'.
The text was updated successfully, but these errors were encountered:
Chabane
changed the title
Subscription using Typescript
Subscription using Typescript - Property 'Subscription' is incompatible with index signature.
Aug 1, 2017
Hello,
I got this error when I tried to execute this code. Do you have any idea?
The text was updated successfully, but these errors were encountered: