Skip to content

Developers · GraphQL

GraphQL Data Overview

Last updated 1 November 2026

The GraphQL operations that read and write records, users and constants, with a worked example.

The data operations read and write the content your site stores: records in your tables, users, and constants. They are the queries and mutations you use most when you build pages on Insites.

Use them whenever a page lists, shows, creates or changes stored data. To change the instance's own code and setup, use the admin operations.

What is in this group

OperationKindWhat it does
recordsQueryReads records from a table, with filter and sort
usersQueryReads users
record_createMutationCreates one record
record_updateMutationChanges the properties you list. Others stay as they are
record_deleteMutationSoft deletes one record and keeps it for 30 days
records_createMutationCreates many records in one operation, without validations or callbacks
records_update_allMutationUpdates every record that matches a filter
records_delete_allMutationSoft deletes every record that matches a filter
user_create, user_update, user_deleteMutationChange one user
constant_set, constant_unsetMutationSet or remove a constant

Example: read two records by slug

Query

{
  records(
    per_page: 5
    filter: {
      table: { value: "modules/website/developers_guide" }
      properties: [{ name: "slug", value_in: ["layouts", "date-format"] }]
    }
  ) {
    total_entries
    results {
      id
      slug: property(name: "slug")
      title: property(name: "title")
    }
  }
}

Response on the docs instance

{
  "data": {
    "records": {
      "total_entries": 2,
      "results": [
        { "id": "1465", "slug": "date-format", "title": "Date Format" },
        { "id": "1485", "slug": "layouts", "title": "Layouts" }
      ]
    }
  }
}

This ran read-only on the docs.insites.io instance, whose pages are records in a table. property reads one value; use property_int, property_boolean or property_array for other types.

Common mistakes

  • Leaving out per_page on records or users. It is required and has no default.
  • Passing a number as value when you write. value is always a string, and a number fails the whole mutation. Use value_int or value_float when the type matters.
  • Calling record_delete with only id. Pass table too, or the delete is refused.
  • Sorting by a property and expecting numeric order. Property sort compares text, so 10 comes before 2.
  • Using records_create for form input. It skips validations and callbacks.