Skip to main content

Using the GraphQL Reference

This guide walks through the Catalog GraphQL API reference. Each section explains one block of the reference UI: what it shows, how the pieces connect, and where to edit values before you send a request. For GraphQL syntax and how to read a query line by line, see Introduction to GraphQL.

Open the Reference

Start at Catalog GraphQL API. That page covers authentication, regional base URLs, and links to the rest of the reference.

Catalog GraphQL API overview page with left navigation sidebar showing Overview, Introduction to GraphQL, Operations, and Types

The left sidebar is your map:

SectionWhat it contains
OverviewAuthentication headers, EU and US base URLs
Introduction to GraphQLHow to read query text and Variables JSON
Using the GraphQL ReferenceThis walkthrough of the reference UI
OperationsEvery query (read) and mutation (write) you can call
TypesInput shapes, response objects, enums, and scalars

Under Operations, blue query badges mark read-only operations. Green mut badges mark mutations that create or update metadata.

The Three-Panel Layout

Open any operation, such as Get tables, to see the full layout. On a wide screen the page splits into three areas:

  1. Left (navigation) - Jump between operations and types.
  2. Center (documentation) - What the operation does, which arguments it accepts, example query text, and the response shape.
  3. Right (Try it) - Live code samples and a form to send the request from your browser.
getTables operation page showing left nav, center documentation, and right Try it panel with curl code sample

On smaller screens the Try it panel stacks under the documentation. Widen your browser window if you do not see the side-by-side layout.

Read the Center Panel

Each operation page follows the same structure top to bottom. The subsections that follow walk through each block in order.

Header and Description

At the top you see a badge (query or mutation) and the operation name, for example getTables. The short description tells you what the call returns or changes.

BlockWhat it tells you
Badgequery means read-only; mutation means create, update, or delete
Operation nameThe root field name to use in GraphQL text, for example getTables
DescriptionPlain-language summary of what the call does

The operation name matches the root field in the Example query and the ?op= value in HTTP URLs on Catalog GraphQL API.

Arguments

The Arguments section lists every input the operation accepts. Each row shows:

PartMeaning
NameArgument name used in the query, for example pagination
TypeSchema type; click the link to open the type page
Required or OptionalWhether you must supply a value

Nested fields under an argument describe the keys allowed inside a Variables object. For example, when pagination has type PublicPagination, the nested rows show nbPerPage and page as the keys you can put inside "pagination": { ... } in Variables JSON.

Arguments section for getTables showing pagination, sorting, and scope with Required and Optional badges and nested PublicPagination fields

Read this block top to bottom:

  1. Top-level rows - Arguments you pass in parentheses on the root field, for example getTables(pagination: $pagination).
  2. Nested rows - Keys inside the Variables object for that argument.
  3. Type links - Open the type page when you need the full field list or enum values.

Example: Query Block

The Example section is the fastest way to copy a working request. It has two blocks. The Query block is GraphQL operation text.

query GetTables($pagination: PublicPagination) {
getTables(pagination: $pagination) {
totalCount
data {
id
name
}
}
}

Walk through each line:

LinePieceWhat it means on this page
1queryRead-only operation. Mutations start with mutation.
1GetTablesOperation label for your logs or client. It does not change the API call.
1($pagination: PublicPagination)Declares one variable. $pagination is filled from Variables JSON. PublicPagination links to the type page.
2getTables(pagination: $pagination)Root field. Matches the operation name in the page header and the Arguments section.
3totalCountField to return: total rows across all pages.
4–7data { id name }Paginated rows and the fields to include on each row.

Copy the whole Query block into the Try it Query field or into your client.

Example section with Query GraphQL block and Variables JSON block showing pagination nbPerPage and page

Some operations have no variables. Those pages show only the Query block.

Example: Variables Block

The Variables block is plain JSON that supplies values for each $variable in the query:

{
"pagination": {
"nbPerPage": 10,
"page": 0
}
}

Walk through each part:

LineKey or valueWhat it means on this page
2"pagination"Matches $pagination from the query. No $ on JSON keys.
3"nbPerPage": 10Page size. Capped at 500 for PublicPagination.
4"page": 0Zero-based page index.

The type name PublicPagination is schema documentation only. It never appears as a JSON key. Operations with multiple arguments add more top-level keys. Each key matches a $variable declared on line 1 of the query.

Response

The Response section lists only the fields you can request on this operation—not every field that exists on the underlying GraphQL type.

BlockWhat it shows
Root typeReturn type for the operation, for example [Column!]! or GetTablesOutput
Scalar fieldsSimple values you can always ask for on this endpoint (id, name, tableId, …)
Nested rowsNested objects you can request on this operation, when supported

Nested paths use dot notation in your query—for example schema { database { name } } on table rows. The Response section lists only fields you can request on this endpoint. If you need related data not shown there (for example table after createColumns), run a follow-up read query such as getColumns or getTables.

If nested fields are not listed under Response, stick to simple fields only.

Use the Try It Panel

The right column is an interactive explorer. You do not need a separate GraphQL client to test a call.

Code Samples

At the top, tabs switch between curl, Python, PowerShell, PHP, and NodeJS. Each sample is a complete HTTP request built from the current query and variables. To change the values, update the query and variables block.

Code sample tabs with curl selected showing POST to graphql endpoint with query and variables in the request body

A curl sample breaks down like this:

BlockWhat it contains
URLRegional host plus ?op=getTables (operation name from the page header)
HeadersContent-Type, Accept, and Authorization: Token ...
Body "query"The GraphQL text from the Query field, often on one line
Body "variables"The JSON object from Variables (JSON)

When you change the Query or Variables (JSON) fields, every language tab updates immediately.

For example, changing "page": 0 to "page": 1 and "nbPerPage": 5 to "nbPerPage": 25 updates the "variables" object in every language tab:

curl code sample after editing variables to nbPerPage 25 and page 1, showing updated variables JSON in the request body

Request Form

Changing values here, will update the values in the code samples block. Below the samples, the Request form has three collapsible sections:

Server Block

ControlEffect
EUSets the host to api.castordoc.com
USSets the host to api.us.castordoc.com

Auth Block

ControlEffect
Token fieldValue sent as the Authorization header. Include the Token prefix.

GraphQL Block

ControlEffect
Query textareaSame GraphQL text as the Example > Query block. Edit fields inside { } to change the response shape.
+ Show variablesOpens the Variables (JSON) textarea when it is hidden
Variables (JSON) textareaSame JSON as the Example > Variables block. Invalid JSON is rejected when you send the request.

Send a Request From the Browser

To run a live call against your Catalog environment:

  1. Open an operation page, for example Get tables.
  2. In Auth, paste a token with the Token prefix.
  3. Confirm Server matches your Catalog region (EU or US).
  4. Review or edit Query and Variables (JSON). Start from the Example section if you are unsure.
  5. Click Send API Request.
  6. Read the Response panel. A 200 status with a "data" object means the call succeeded. Errors appear in the response body with details about what went wrong.

Response Panel

After you click Send API Request, the Response panel shows the HTTP result:

BlockWhat to look for
Status code200 means the HTTP request reached the API
dataFields you asked for in the Query selection set
errorsGraphQL or validation messages when something failed

Compare the data object to the fields in your Query block. Nested keys should match the selection set you built in the center panel Example or in the Try it Query field.

Query and Variables: Quick Reference

Use this table when you need a side-by-side reminder of how Query text and Variables JSON fit together:

Query (GraphQL text)Variables (JSON)
FormatGraphQL syntaxPlain JSON object
DeclaresOperation name, $variables, fields to returnActual values for each variable
Key rule$pagination in the query"pagination": { ... } in JSON. No $ on keys.
Where to edit in the referenceExample > Query and Try it Query fieldExample > Variables and Try it Variables (JSON) field
Sent to the API as"query": "..." in the POST body"variables": { ... } in the POST body

The HTTP POST body always combines both:

{
"query": "query GetTables($pagination: PublicPagination) { ... }",
"variables": {
"pagination": { "nbPerPage": 10, "page": 0 }
}
}
LineKeyWhat it is
2"query"Full GraphQL operation text as a JSON string
3"variables"JSON object whose keys match $variables in the query
4"pagination"One variable value. Nested keys come from the Arguments section and type pages.

For a deeper explanation of each line in the query, see Introduction to GraphQL.

Type Pages

When an argument or field links to a type name, open that type under Types in the sidebar. Each type page follows the same block pattern as operation Arguments and Response sections:

Type kindWhat the page describes
InputKeys allowed in Variables JSON
ObjectFields you can select in { }
EnumAllowed string values such as sort direction
ScalarSingle values such as String, Int, or ID

Use type pages when the Arguments nested rows or Response tree do not show every field you need.

What's Next?