Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.firstresonance.io/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The API Playground is the fastest way to explore the ION GraphQL schema and try queries against your tenant before writing client code. It loads the live schema, autocompletes types and fields as you type, and runs queries against https://api.firstresonance.io/graphql using a token you provide. If you’ve used GraphiQL or Apollo Studio Explorer, this is the same idea — embedded directly into the docs.

Authenticate

Before running any query, set your access token in the Authorization header field at the top of the playground:
Authorization: Bearer <your-token>
How to get a token: The playground stores tokens locally in your browser; they aren’t sent anywhere except the ION API.

Quick start

Try this query first to confirm your token works and the playground is wired up correctly:
query Me {
  currentUser {
    id
    name
    email
    organization { id domain }
  }
}
A successful response means your token is valid for the tenant in organization.domain. If you get an errors[] payload instead, see Authentication → Error codes.

What you can do here

  • Schema explorer — click any type to see its fields, arguments, and return types. Hover over a field to see its description (pulled from the underlying graphene definition).
  • Autocomplete — start typing a field and the playground suggests valid completions for the current selection set.
  • Variables panel — pass query variables as JSON instead of hardcoding them in the query body.
  • Headers panel — set Authorization and any other custom headers.
  • History — every query you run is saved locally so you can re-run or share with teammates.
  • Schema docs sidebar — type __schema or __type to run an introspection query and inspect the schema programmatically.

Examples to try

List parts

query Parts {
  parts(filters: {}, limit: 10) {
    id
    partNumber
    description
    partFamily { id name }
  }
}

Get one run with steps

query Run($id: Int!) {
  run(id: $id) {
    id
    title
    status
    runSteps {
      id
      stepNumber
      status
      runStepFields { id label value }
    }
  }
}
Variables:
{ "id": 1234 }

Create a part (mutation)

mutation CreatePart($input: PartCreateInput!) {
  createPart(input: $input) {
    part {
      id
      partNumber
      description
    }
  }
}
Variables:
{
  "input": {
    "partNumber": "TEST-001",
    "description": "Playground test part"
  }
}
Mutations are real. The playground hits the live API. Use a sandbox tenant when prototyping mutations so you don’t pollute production data.

Schema reference

The full GraphQL schema is also checked into this repository as schema.graphql. It’s kept in sync with the production diplo schema by an automated GitHub Action that opens a PR whenever the schema changes. Three ways to discover what’s available:
  1. Right here in the playground — click around the schema explorer
  2. Read the file directly — open schema.graphql in your editor; ~32,000 lines, alphabetical
  3. Introspection query — run query { __schema { types { name kind } } } from the playground

Tips

  • Use the variables panel. Hardcoding IDs in the query body is fine for one-off exploration but breaks immediately when you copy the query into a real client. Always use $varname plus a JSON variables block — it’s the same shape your client will use.
  • Save common queries. The history panel keeps recent queries; for queries you re-use across teammates, paste them into a shared note or a fragment library.
  • Don’t paste production tokens into shared screens. The playground stores them locally but be careful in screen-share sessions.
  • Set __typename everywhere when prototyping. It costs nothing on the wire and helps you debug “wait, what type did this return?” mid-query.
  • Turn on the docs sidebar (usually a “Docs” button in the playground UI) — it’s the same as running introspection but with nicer ergonomics.