Replies: 3 comments
-
|
Additionally, is the right to left order intended? Can find anything on it in the official gql spec. will execute generated.go: |
Beta Was this translation helpful? Give feedback.
-
|
Directive order is significant, but the specification does not specify how. There should be a clarification in the new spec |
Beta Was this translation helpful? Give feedback.
-
|
Is there any updates on gqlgen on this topic ? Im having the same issue as described by @prusov, where a query/mutation validation must be checked before any argument validation. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
Directives execution order is not logical.
Directives for input are executed before directives for mutation/query itself
In my case, this behavior leads to that input validation occurs in any case, even if the user does not have a role to execute mutation.
What did you expect?
The order of calling directives should be from "general" to "specific". That is, first for the query / mutation, and then for its arguments.
See schema for example.
expected: hasRole, canEdit
actial: canEdit, hasRole
Minimal graphql.schema and models to reproduce
versions
gqlgen version?v0.11.3-dev
go version?go version go1.13.4 windows/amd64
dep or go modules?
go modules
Beta Was this translation helpful? Give feedback.
All reactions