---
searchable: false
---

import { Callout } from '@theguild/components'

# 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:

```sh npm2yarn
npm i @graphql-inspector/cli
```

Then you can point documents to the `audit` command:

```sh
graphql-inspector audit DOCUMENTS
```

<Callout>
  Learn more about this command, and [GraphQL Inspector
  here](https://the-guild.dev/graphql/inspector/docs/commands/audit#audit---usage)
</Callout>
