-
-
Notifications
You must be signed in to change notification settings - Fork 809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Declaring schema directive on extended type does not populate astNode.directive property #1296
Comments
Caused by checking only astNode rather than also all extensionASTNodes at https://github.com/apollographql/graphql-tools/blob/master/src/schemaVisitor.ts#L546 Fixed in graphql-tools-fork v8.9.5 |
That's fantastic @yaacovCR - Indeed that has fixed the issue. Thank you! |
Why just not taking over graphql-tools-fork fixes to graphql-tools? Really hard for me to understand, just to say its deprecated. Seems to me, like a sad story. |
Declared a custom @auth directive on OBJECT:
directive @auth on OBJECT
The directive extends
SchemaDirectiveVisitor
and implementsvisitObject
When the directive is applied to the original type it works correctly and the type requires authorisation.
When the directive is applied to an extended type (and not the original type definition) it is completely ignored.
When applied to the extended type the
astNode.directives
property of theStream
type is empty.I couldn't see anything in the docs or the spec which suggests that OBJECT level directives can not be applied to extended types. Any ideas?
The text was updated successfully, but these errors were encountered: