---
description: An App is a service that provides users access to the 0x API
---

# App

{% tabs %}
{% tab title="Query" %}
```graphql
query Apps {
  apps(limit: 1) {
    chains
    app
  }
}
```
{% endtab %}

{% tab title="Response" %}
```json
{
  "data": {
    "apps": [
      {
        "chains": [
          "Avalanche",
          "BSC",
          "Celo",
          "Ethereum",
          "Fantom",
          "Optimism",
          "Polygon"
        ],
        "app": "Brave Wallet"
      }
    ]
  }
}
```


{% endtab %}

{% tab title="Code" %}
```javascript
async function fetchGraphQL(operationsDoc, operationName, variables) {
  const result = await fetch(
    "https://api.0x.org/data/v0",
    {
      method: "POST",
      headers: {
        '0x-api-key': 'USE_APY_KEY_HERE'
      },
      body: JSON.stringify({
        query: operationsDoc,
        variables: variables,
        operationName: operationName
      })
    }
  );

  return await result.json();
}

const operationsDoc = `
  query Chains {
    apps(limit: 1) {
      chains
      app
    }
  }
`;

function fetchChains() {
  return fetchGraphQL(
    operationsDoc,
    "Chains",
    {}
  );
}

async function startFetchChains() {
  const { errors, data } = await fetchChains();

  if (errors) {
    // handle those errors like a pro
    console.error(errors);
  }

  // do something great with this precious data
  console.log(data);
}

startFetchChains();
```
{% endtab %}
{% endtabs %}
