# GraphQL schema

URL: https://developers.uidu.org/docs/reference/schema

> Explore the uidu GraphQL schema interactively, and find the generated TypeScript types the SDK uses.

The SDK calls one GraphQL endpoint per workspace:

```
https://{workspace}.uidu.org/graphql
```

The schema is large — most of it is internal admin surface (invoices, expense reports, journal entries, approvals) that `@uidu/client` deliberately doesn't expose. The [Apps](https://developers.uidu.org/docs/domains/cms.md) section is the curated, public-facing slice.

## Explore the schema interactively

Open &#x2A;*[Apollo Sandbox](https://studio.apollographql.com/sandbox/explorer?endpoint=https%3A%2F%2Fuidu.uidu.org%2Fgraphql)** with the uidu endpoint pre-filled. You'll get autocomplete, a schema browser, query history, and shareable URLs — no install required.

To run authenticated queries, click the **Headers** tab in Sandbox and add:

```
X-Uidu-Public-Token: pk_live_...
```

(For your own workspace, swap `uidu.uidu.org` for `{your-workspace}.uidu.org` in the URL.)

<Callout type="info">
  Apollo Sandbox is hosted by Apollo Studio; nothing is sent to Apollo's servers except for the schema introspection round trip, which the workspace already serves publicly.
</Callout>

## Types in your editor

If you're writing TypeScript, the canonical reference is the generated types file in the SDK repo:

```
packages/client/src/generated/index.ts
```

Every type the SDK consumes — `Page`, `Event`, `Booking`, `Course`, every connection, every input — is exported from there. The file is regenerated against the live schema on every build of `@uidu/client`.

Import them directly when you need them:

```ts
import type {
  Page,
  Event,
  Booking,
  Course,
  Campaign,
  Contact,
  Deal,
  KbArticle,
} from '@uidu/client';
```

## Alternative explorers

* **GraphiQL** (`https://github.com/graphql/graphiql`) — self-host the React component if you want an explorer inside your own app.
* **Insomnia / Postman** — both have first-class GraphQL support with schema introspection. Useful for testing mutations with custom auth flows.
* **`graphql-request`** + a `.graphql` file — the [`@uidu/client`](https://developers.uidu.org/docs/foundations/installation.md) approach, ergonomic for production code.

## Why we don't ship 3000+ auto-generated reference pages

We tried (with [graphql-markdown](https://graphql-markdown.dev/)) and the output buried the curated docs under thousands of internal types. Apollo Sandbox is a better experience for the rare cases where you want to dig into the schema directly, and `generated/index.ts` is a better experience for type lookups while you write code.
