> For the complete documentation index, see [llms.txt](https://docs.scaleconnect.com.au/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scaleconnect.com.au/api/graphiql.md).

# GraphiQL

{% @scale-docs-page-title/page-title title="GraphiQL" %}

{% hint style="warning" %}
**Confirm before publishing:** the hosted explorer URL, approved user login, public GraphQL endpoint, schema role, CORS, introspection policy and whether queries may be executed from the browser. The existing `graphy` explorer is an internal development tool at `http://localhost:3077`, not a public hosted service.
{% endhint %}

GraphiQL is the interactive explorer for the GraphQL schema. Use it to find fields, check their types and run small read-only queries against permitted test data.

## Explore a query

1. Open the approved GraphiQL environment and sign in with the identity for that environment.
2. Use the **Docs** panel to find a collection, field or input type.
3. Write a query that selects only the fields needed.
4. Put variable values in the **Variables** panel; do not paste credentials into query text.
5. Run the query and inspect both `data` and `errors`.
6. Paginate a collection using its `pageInfo` and cursor arguments.

```graphql
query ReadBook($clientIds: [UUID!]!, $first: Int = 10) {
  userCollection(filter: { id: { in: $clientIds } }, first: $first) {
    edges { node { id } }
    pageInfo { endCursor hasNextPage }
  }
}
```

The authorized client IDs in ScaleAI's templates come from the backend. A public explorer must use a user-scoped gateway; it must never expose the engine's database role or a service-role key in browser settings.

## What the schema shows

The internal schema reflects stored PostgreSQL tables and foreign-key relationships. It does not list calculated backend outputs, Neo4j concepts or REST-only workflows. A field's presence in the internal explorer is **not** an entitlement to use it from a public integration.

The curated [GraphQL guide](/api/graphql.md) explains the query groups and access boundary. Once the public schema is approved, this page should open that schema directly and provide a copyable query plus a safe sandbox dataset.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.scaleconnect.com.au/api/graphiql.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
