graphql-shield icon indicating copy to clipboard operation
graphql-shield copied to clipboard

Execute root fields rules prior graphql execute phase

Open dimatill opened this issue 2 years ago • 0 comments

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.

dimatill avatar Oct 28 '22 16:10 dimatill