-
-
Notifications
You must be signed in to change notification settings - Fork 205
Open
Description
We currently assume flattenFragments
set to true
for the audit
command, but assume flattenFragments
set to false
for the validate
command.
The reason for this is that the validate
command was present before introducing the audit
command and for some reason we re-implemented the depth count algorithm from scratch for the latter command based on the graphql-armor
implementation (see graphql-armor
source code).
To fix this inconsistency we should:
- Use the same implementation for both the
audit
andvalidate
command - Add a parameter for customizing how fragments should be treated (e.g.
--max-depth-flattenfragments
)
By default it makes more sense to have flattenFragments
to be set to true
as they do not really introduce depth for the execution compared to e.g. a selection set.
Metadata
Metadata
Assignees
Labels
No labels