# `servers`

The `servers` option sets the GraphQL endpoints that the `Try it` button sends requests to.
The `Try it` button on GraphQL query and mutation samples opens Replay, where users can edit the operation and send it.
Replay lists each endpoint as an environment, so users can switch between endpoints such as production and sandbox.
Without `servers`, Replay uses the address of your documentation site, and users have to type the endpoint before they send a request.

**Early access**

This is a feature in early access.
It may not be available for your organization yet, and its behavior may change before general availability.

To request access to this feature, contact our [Support team](mailto:team@redocly.com).

The **code** servers  is not available in Redoc Community Edition.

## Options

| Option | Type | Description |
| --- | --- | --- |
| servers | [[Server object](#server-object)] | List of GraphQL endpoints for the `Try it` button. A list in an API entry replaces the list under the root `graphql` key. |

### Server object

| Option | Type | Description |
| --- | --- | --- |
| url | string | **REQUIRED.** Full URL of the GraphQL endpoint, including the path, for example `https://api.example.com/graphql`. The URL must start with `http://` or `https://`. |
| description | string | Name of the endpoint in Replay. Replay shows the URL when you don't set a description. |

## Examples

### Set endpoints for all GraphQL APIs

The following example adds a production and a sandbox endpoint to every GraphQL API in the project:

```yaml
graphql:
  servers:
    - url: https://api.example.com/graphql
      description: Production
    - url: https://sandbox.example.com/graphql
      description: Sandbox
```

### Set the endpoint for one GraphQL API

The following example sets the endpoint for the `library` API only.
The list replaces the root `graphql.servers` list for this API:

```yaml
apis:
  library@v1:
    root: ./graphql/library.graphql
    graphql:
      servers:
        - url: https://library.example.com/graphql
          description: Library API
```

## Resources

- **[GraphQL](https://graphql.org/)** - Official GraphQL specification and documentation for understanding query language fundamentals
- **[Configuration options](/docs/platform/config)** - All the other options for your project
- **[hideReplay](/docs/platform/config/graphql/hide-replay)** - Hide the `Try it` button when you don't want users to send requests from the docs
- **[corsProxyUrl](/docs/platform/config/graphql/cors-proxy-url)** - Choose the proxy that Replay uses for cross-origin requests to your endpoints
- **[GraphQL configuration](/docs/platform/config/graphql)** - All the options you can set under `graphql`
- **[Replay API explorer](https://redocly.com/docs/end-user/test-apis-replay)** - How users test APIs from the reference docs
