notrab
06/19/2018, 7:14 PMlisting: forwardTo('db')
to my resolver. I get the following mesage:
import { GraphQLServer } from 'graphql-yoga'
import { forwardTo} from 'prisma-binding'
import { Prisma } from './generated/prisma'
Argument of type '{ typeDefs: string; resolvers: { Query: { listing: (parent: any, args: any, context: any, info: G...' is not assignable to parameter of type 'Props'.
Types of property 'resolvers' are incompatible.
Type '{ Query: { listing: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; }; M...' is not assignable to type 'IResolvers'.
Property 'Query' is incompatible with index signature.
Type '{ listing: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; }' is not assignable to type '(() => any) | IResolverObject | GraphQLScalarType'.
Type '{ listing: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; }' is not assignable to type 'GraphQLScalarType'.
Property 'name' is missing in type '{ listing: (parent: any, args: any, context: any, info: GraphQLResolveInfo) => any; }'.
Moritz
06/19/2018, 7:17 PMnotrab
06/19/2018, 7:18 PMnotrab
06/19/2018, 7:18 PMMoritz
06/19/2018, 7:19 PMnow
works though, seems to be somehow workaroundable with some typescript config. Havent found the trick yet though 😞notrab
06/19/2018, 7:23 PMMoritz
06/19/2018, 7:35 PMMoritz
06/19/2018, 7:35 PMgroup(parent, args, ctx: Context, info) {
return ctx.db.query.group(args, info);
},
notrab
06/19/2018, 7:36 PM