-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Today the DataFetchingEnvironment has access to graphql.execution.directives.QueryAppliedDirective for the directives on fields.
We don't have the same for directives on operations.
query q @timeout(ms : 23445) {
f
}
To get this operation directives one must parse raw AST of graphql.language.OperationDefinition and the raw graphql.language.Directive within
We should have a way to get this during execution
- graphql.execution.ExecutionContext should have access to a list of "operation level" QueryAppliedDirective s
- graphql.normalized.ExecutableNormalizedOperation should have access to the same list
I dont think its a stretch in naming to say that QueryAppliedDirective is applicable to operations - eg Query is a quasi synnonym for an mutation operation and subscription opperation anyway
And we dont burn yet another type name by introducing MutationAppliedDirective and SubscriptionAppliedDirective which are all the same thing say. Ideally it would be ExecutableOperationAppliedDirective but that ship has sailed probably (maybe we introduce it UNDER QueryAppliedDirective)
?