Loading...
Loading...
TRIGGER when: user asks about querying or mutating Steedos data via GraphQL (POST /graphql); asks about auto-generated GraphQL operations ({object}, {object}__findOne, {object}__count, {object}__insert, {object}__update, {object}__delete); asks about __expand for lookup expansion, _display for formatted values, _permissions for record permissions, _related_* for related records, or DataLoader batching; asks about filters/pagination/sorting in a GraphQL query against Steedos; asks about Apollo Playground at /graphql. SKIP: user wants REST API CRUD — use steedos-server-api or steedos-builder6-api; user wants to call a server function — use steedos-object-functions + steedos-server-api; user is building a generic GraphQL server unrelated to Steedos. Steedos GraphQL API auto-generated from object metadata at /graphql. Covers all CRUD queries/mutations, lookup expansion, display formatting, record permissions, related records, filters, pagination, and authentication.
npx skill4agent add steedos/steedos-platform steedos-graphql-apiPOST /graphqlAuthorization: Bearer {token}application/json/graphqlSTEEDOS_GRAPHQL_ENABLE_CONSOLEorders{objectName}{
orders(
filters: [["status", "=", "approved"]]
fields: ["_id", "name", "amount"]
top: 20
skip: 0
sort: "created desc"
) {
_id
name
amount
status
}
}{objectName}__findOne{
orders__findOne(id: "67abc123def456") {
_id
name
amount
customer
}
}{objectName}__count{
orders__count(filters: [["status", "=", "draft"]])
}| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| JSON | No | none | OData-style filter array, e.g. |
| JSON | No | all | Array of field names to return |
| Int | Yes | 10000 | Max records to return (max 10,000) |
| Int | Yes | 0 | Pagination offset |
| String | No | none | Sort expression, e.g. |
=, !=, >, >=, <, <=
contains, notcontains, startswith
in, notin
between[["status", "=", "active"]]
[["amount", ">", 1000], ["status", "in", ["draft", "submitted"]]]
[["name", "contains", "test"]]{objectName}__insertmutation {
orders__insert(doc: {
name: "ORD-2026-001",
customer: "cust_abc123",
amount: 5000,
status: "draft"
}) {
_id
name
amount
}
}space{objectName}__updatemutation {
orders__update(
id: "67abc123def456",
doc: { status: "approved", approved_at: "2026-04-23T10:00:00Z" }
) {
_id
name
status
}
}{objectName}__deletemutation {
orders__delete(id: "67abc123def456")
}enable_trash__expand{
orders__findOne(id: "67abc123def456") {
_id
name
customer # Returns raw ID: "cust_abc123"
customer__expand { # Returns expanded object
_id
name
email
phone
}
}
}_display{
orders__findOne(id: "67abc123def456") {
_id
amount # Raw value: 5000
status # Raw value: "approved"
_display {
amount # Formatted: "¥5,000.00"
status # Localized label: "已批准"
created # Formatted date: "2026-04-23 10:00"
}
}
}_permissions{
orders__findOne(id: "67abc123def456") {
_id
name
_permissions {
allowCreate
allowEdit
allowDelete
field_permissions
}
}
}_related_*{
orders__findOne(id: "67abc123def456") {
_id
name
_related_order_items_order { # Detail records via lookup field "order"
_id
product
quantity
price
}
_related_files {
_id
name
}
_related_tasks {
_id
name
status
}
_related_notes {
_id
body
}
}
}_related_{childObjectName}_{lookupFieldName}| Steedos Field Type | GraphQL Type |
|---|---|
| text, textarea, html, url, email | |
| number, currency, percent | |
| boolean | |
| date, datetime, time | |
| select (single) | |
| select (multiple) | |
| lookup, master_detail | |
| image, file | |
| formula, summary | Depends on return type |
| Other | |
# Bearer token
curl -X POST /graphql \
-H "Authorization: Bearer eyJhbGciOi..." \
-H "Content-Type: application/json" \
-d '{"query": "{ space_users { _id name } }"}'
# Cookie-based session (from browser)
# Cookies: X-Space-Id, X-Auth-TokenUnAuthorizedErrorSTEEDOS_GRAPHQL_ENABLE_DATALOADER=true # default# Fetch orders with expanded customer, display values, and permissions
{
orders(
filters: [["status", "in", ["submitted", "approved"]], ["amount", ">", 1000]]
sort: "amount desc"
top: 10
) {
_id
name
amount
status
order_date
customer__expand {
_id
name
phone
}
_display {
amount
status
order_date
}
_permissions {
allowEdit
allowDelete
}
}
}# Create an order and return the new record
mutation {
orders__insert(doc: {
name: "ORD-2026-042",
customer: "cust_abc123",
amount: 8500,
status: "draft",
order_date: "2026-04-23"
}) {
_id
name
amount
customer__expand {
name
}
}
}| Variable | Default | Description |
|---|---|---|
| | Enable Apollo Playground at /graphql |
| | Enable DataLoader batching |
topis_deleted: true