Description
Directives are a fundamental part of GraphQL and as such I believe should be part of the base providing of any GraphQL implementation. It should be fairly straight forward to add as it's not much different from adding a new type, or interface, etc. Happy to do it with a bit of guidance.
Additional context or points of discussion
I would not ask or bother with this feature were I able to access the GraphQL schema directly during schema build, but I haven't been able to achieve that as the schema instance is generated right before generating the schema (as far as I understood the source code). If we can expose the schema, I'd prefer doing that as it's much less work Adding a directive is as easy as:
<?php
use GraphQL\Type\Definition\Directive;
$directive = new Directive($config);
$graphqlSchema->directives[] = $directive;
That is all.
Validations
PRs
Description
Directives are a fundamental part of GraphQL and as such I believe should be part of the base providing of any GraphQL implementation. It should be fairly straight forward to add as it's not much different from adding a new type, or interface, etc. Happy to do it with a bit of guidance.
Additional context or points of discussion
I would not ask or bother with this feature were I able to access the GraphQL schema directly during schema build, but I haven't been able to achieve that as the schema instance is generated right before generating the schema (as far as I understood the source code). If we can expose the schema, I'd prefer doing that as it's much less work Adding a directive is as easy as:
That is all.
Validations
PRs