graphql-resolver-typescript-gen
v0.0.1
Published
supports custom @ownResolver directive
Downloads
5
Readme
graphql-resolver-typescript-gen
supports custom @ownResolver directive
type Directory {
id: ID!
files: [File!] @ownResolver
}
// will generate below
export interface Directory {
__typename?: 'Directory';
id: string;
}
export type DirectoryResolver<TContext = any> = {
files: (parent: Directory, args: {}, context: TContext, info: GraphQLResolveInfo) => Promise<File[] | null> | File[] | null;
__isTypeOf?: (obj: Directory, context: TContext, info: GraphQLResolveInfo) => Promise<boolean> | boolean;
};