confuser/graphql-constraint-directive

Typings for Apollo are not correct

javi11 opened this issue · 2 comments

Hey, we saw that typings as a Apollo plugin are not valid we see this error:

(alias) createApolloQueryValidationPlugin(): (schema: GraphQLSchema) => function import createApolloQueryValidationPlugin Type '(schema: GraphQLSchema) => function' is not assignable to type 'PluginDefinition'. Type '(schema: GraphQLSchema) => function' is not assignable to type '() => ApolloServerPlugin<BaseContext>'.ts(2322)

export function createApolloQueryValidationPlugin () : (schema: GraphQLSchema) => function;

shouldn't be like this?

export function createApolloQueryValidationPlugin({ schema: GraphQLSchema }) : PluginDefinition;

I can create a PR if you want

PRs welcome

@confuser i've put a PR in review if you like