Documentation
Gateway
Other Features
Security
Audit Documents

Audit Documents

Audit your documents for useful metrics such as query depth, directive count and alias count. This is useful if you want to introduce security rules on your GraphQL server (e.g. via graphql-armor) and need to figure out the values for doing so.

How to use?

You need to install the @graphql-inspector/cli package:

npm i @graphql-inspector/cli

Then you can point documents to the audit command:

graphql-inspector audit DOCUMENTS
💡

Learn more about this command, and GraphQL Inspector here