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

# Refresh Connection

The `connectionRefresh` mutation triggers an asynchronous job that refreshes the metadata for a data warehouse connection. Specifically, it refreshes the list of databases, tables, and columns for the given connection.

This operation starts a background job and returns immediately without waiting for completion. The refresh process will discover new tables, updated schemas, and column changes in your data warehouse.

## Signature

```graphql theme={null}
connectionRefresh(id: ID!): Boolean!
```

<Note>
  This mutation can only be executed by an administrator or a data administrator of the specific connection ID.
</Note>

<Warning>
  The refresh cannot be triggered when a connection is already in `QUEUED` or `RUNNING` status. Wait for the current sync to complete before starting a new one.
</Warning>

## Arguments

<ParamField path="id" type="ID!" required>
  The unique identifier of the connection to refresh
</ParamField>

## Response

The response returns a `Boolean` indicating whether the refresh job was successfully triggered:

* `true` - Refresh job was successfully started

<Info>
  On failure, the mutation throws a GraphQL error rather than returning `false`.
</Info>

## Usage example

To refresh a connection's metadata, provide the connection ID to the mutation. Here's an example of how this mutation could be used:

```graphql theme={null}
mutation RefreshConnection($id: ID!) {
  connectionRefresh(id: $id)
}
```

<RequestExample>
  ```bash Request theme={null}
  curl -X POST \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer <jwt_token>" \
    -d '{
      "query": "mutation RefreshConnection($id: ID!) { connectionRefresh(id: $id) }",
      "variables": {
        "id": "et-connection-id-here"
      }
    }' \
    https://{ACCOUNT}.askwisdom.ai/graphql
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": {
      "connectionRefresh": true
    }
  }
  ```
</ResponseExample>

## Next steps

<CardGroup cols={2}>
  <Card title="Check Refresh Status" icon="clock" href="/integrations/graphql-api/queries/connection/connection">
    Monitor refresh progress with connection query
  </Card>

  <Card title="Create Domain" icon="plus" href="/integrations/graphql-api/mutations/domain/create-domain">
    Create domains after refresh completion
  </Card>
</CardGroup>
