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
If you’ve ever queried ION’s API and gotten back results that looked empty — empty strings, missing IDs,null everywhere — the issue almost certainly isn’t that your data doesn’t exist. It’s that your query didn’t ask for it.
GraphQL never returns fields you didn’t explicitly select. That’s a feature (you only pay for what you ask for) but it surprises every developer coming from REST, where the server decides what comes back.
This page explains the model, shows the failure mode, and gives you copy-paste patterns to query ION’s most common entities completely.
Why field selection works this way
In a REST API,GET /parts/42 returns whatever the server decides — probably every column on the row. In GraphQL, you describe the response shape:
id and partNumber, nothing else. No description, no revision, no partSubtypes — even though those fields exist. The server only returns what was asked for.
This is great for performance (you don’t pay for joins you don’t need) and great for evolution (adding fields to the schema doesn’t break anyone), but it means you have to know what you want before you query.
The blank-response trap
The most common failure mode is asking for an entity but selecting only the wrapper: Sparse query — looks like nothing came back:partNumber. Add the fields you actually need:
Complete query:
Selecting nested objects
Nested objects (relationships) need their own field selections — the same rule applies recursively. Querying a relationship without selecting any of its fields is a syntax error in GraphQL:Patterns for ION’s main entities
Here are minimum-viable field selections for the entities you’ll touch most. Drop these into your queries when you don’t yet know what you’ll need — easier to remove fields later than to chase down “why is this blank.”Parts
Part Inventory (a stockable instance of a part)
Runs
Purchase Orders
Issues
Using fragments for reusable selections
A fragment is a named selection set you can reuse across queries. They keep your client code DRY and make field-selection consistency easy to enforce.revision everywhere, you change the fragment in one place.
In a Python or JavaScript client, define each fragment once at module load and compose it into queries — see the Python Quickstart for an end-to-end pattern.
Discovering available fields
Three ways to find out what fields an entity has:1. Use the schema explorer in the API Playground
The Mintlify API Playground embeds the live ION GraphQL schema. Click into any type to see every field, its return type, its arguments, and its description.2. Run an introspection query
GraphQL has a built-in introspection mechanism — query the schema itself to enumerate types:3. Read the schema file
The full schema is committed to this repository asschema.graphql and synced from the production diplo schema (see Mintlify API Playground for the sync workflow). Open the file in your editor to grep for types and fields by hand.
Tips
- Start broad, narrow as you go. When prototyping a new query, request more fields than you think you need. After the integration is working, trim the selection set down to what your code actually uses.
- Use fragments to enforce consistency. If three queries return parts, all three should use the same fragment. Avoids the “this query returns
revisionbut that one doesn’t” inconsistency that bites integrations later. - Watch for nullable fields. Many ION fields are nullable (
description,revision, etc.). Selecting them isn’t enough — your code must handle thenullcase. __typenameis free. Adding__typenameto a selection set helps when you parse polymorphic responses or want to assert at runtime that you got back what you expected.
Related
- Authentication
- Getting Started
- API Playground — interactive schema explorer
- Common Queries Guide — 20 ready-to-run queries with full field selection
- Python Quickstart — pattern for fragment composition in code