> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Check feature gate

> Check whether a plan allows a feature before offering it, for the caller or for the owner of a project; returns allowed with the required tier, limit and current count, and a denied gate is a result, not an error.

`featureGate(input: FeatureGateCheckInput!): FeatureGate!`

## Arguments

| Argument | Type | Required |
| - | - | - |
| `input` | [`FeatureGateCheckInput!`](https://veryfront.com/docs/cloud/graphql/types/featuregatecheckinput) | Yes |

## Input fields

### input

[`FeatureGateCheckInput`](https://veryfront.com/docs/cloud/graphql/types/featuregatecheckinput)

| Field | Type | Required | Description |
| - | - | - | - |
| `gate` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Yes | |
| `currentCount` | [`Int`](https://veryfront.com/docs/cloud/graphql/types/int) | No | |
| `projectReference` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | Optional project ID or slug. When supplied for a gate other than projects, checks the project owner and requires project.read. The projects gate always checks the caller. |
| `projectId` | [`ID`](https://veryfront.com/docs/cloud/graphql/types/id) | No | Optional project ID or slug. When supplied for a gate other than projects, checks the project owner and requires project.read. The projects gate always checks the caller. Deprecated: Use projectReference. |

## Response

Returns [`FeatureGate!`](https://veryfront.com/docs/cloud/graphql/types/featuregate). Open the type for its fields and nested types.

| Field | Type | Description |
| - | - | - |
| `gate` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | The gate that was checked. |
| `allowed` | [`Boolean!`](https://veryfront.com/docs/cloud/graphql/types/boolean) | |
| `requiredTier` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | |
| `limit` | [`Float`](https://veryfront.com/docs/cloud/graphql/types/float) | |
| `currentCount` | [`Float`](https://veryfront.com/docs/cloud/graphql/types/float) | |

Types marked with `!` cannot be null. Lists use `[Type]` notation. The [type index](https://veryfront.com/docs/cloud/graphql/schema.md) lists all published input and response types.

## Example

```graphql title="query.graphql" theme={null}
query FeatureGate($input: FeatureGateCheckInput!) {
  featureGate(input: $input) {
    allowed
    currentCount
    gate
    limit
    requiredTier
  }
}
```

```json title="variables.json" theme={null}
{
  "input": {
    "gate": "custom_domains"
  }
}
```

<details>
  <summary>Try this query</summary>

  Calls use `https://api.veryfront.com/graphql`. Replace sample values with resources you can access. See [Authentication](https://veryfront.com/docs/cloud/authentication.md) for credentials and permissions.

  Bearer token or API key

  Stored in this tab's session. Clear credential

  Query

  Variables (JSON)
</details>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.