graphql-shield
graphql-shield copied to clipboard
Execute root fields rules prior graphql execute phase
Root field rules that aren't dependent on the parent could be executed before any of resolvers logic is executed.
There is no way to execute rules assigned to Objects or non-root Fields prior to the execution phase because of the inability to determine the actual type of Unions before the execution phase.
Rules could be executed in the validation phase or just before graphql.js execute call.