graphql icon indicating copy to clipboard operation
graphql copied to clipboard

Inject custom directives

Open Masadow opened this issue 3 months ago • 0 comments

Hi,

https://github.com/neo4j/graphql/blob/f7bdadbf97ccf7c6d1afaaea40ba3f015d28e378/packages/graphql/src/classes/Neo4jGraphQL.ts#L364

validateDocument takes an additionalDirective parameter that could be given when instantiating Neo4jGraphQL class instead of using documentDirectiveTransformer after the validation of the schema.

This would prevent unexpected errors such as Object types need a way to be resolved for field because obviously, our custom directives did not add the resolvers upon validation time.

It seems to be a very simple addition but I don't have the time to commit to it unfortunately

Masadow avatar Mar 13 '24 18:03 Masadow