kadirahq/graphql-errors

Where to add to GraphQL Yoga ?

iangregsondev opened this issue · 1 comments

Hi,

I recently moved over to Graphql yoga and I am using typescript.

Currently starting my server like so

const server = new GraphQLServer({
  typeDefs: this.typeDefs,
  resolvers: shieldedResolvers as any
});

which works great. So now I want to add the formatErros into the mix. Although I am unsure what it is..

These are the props that I have that are taken from the contructor.

constructor(props: Props);

export interface Props {
    directiveResolvers?: IDirectiveResolvers<any, any>;
    schemaDirectives?: {
        [name: string]: typeof SchemaDirectiveVisitor;
    };
    typeDefs?: ITypeDefinitions;
    resolvers?: IResolvers;
    resolverValidationOptions?: IResolverValidationOptions;
    schema?: GraphQLSchema;
    context?: Context | ContextCallback;
    mocks?: IMocks;
    middlewares?: IFieldMiddleware[];
}

Of course its not typeDefs, Resolvers, I did try middleware but it didn't work.

Anyone have any ideas ?

sorry added to wrong repo