# `servers`

The `servers` option sets the GraphQL endpoints of your API.
The overview page of the API reference lists the endpoints in a **Servers** panel.
Users can copy a URL from the panel to call the API from their own client.
The panel is displayed even when you hide the `Try it` button with [`hideReplay`](/docs/platform/config/graphql/hide-replay).

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.
With version 1.0 or later of the `@redocly/framework` package, Replay also lists the mock server, first by default; to move, rename, or hide it, use the [`mockServer`](/docs/platform/config/graphql/mock-server) option.
Without `servers`, the overview page has no **Servers** panel.
Without `servers` and without the mock server, 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).

**Redoc CE**

Redoc CE displays the **Servers** panel.
The `Try it` button is not part of Redoc CE.

## Options

| Option | Type | Description |
| --- | --- | --- |
| servers | [[Server object](#server-object)] | List of GraphQL endpoints for the **Servers** panel and 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 the **Servers** panel and in Replay. Without a description, the panel shows only the URL and Replay uses the URL as the name. |

## 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
- **[mockServer](/docs/platform/config/graphql/mock-server)** - Configure the mock server that Replay lists next to your endpoints
- **[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
