> For the complete documentation index, see [llms.txt](https://docs.pyck.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pyck.cloud/graphql-api/graphql.md).

# Introduction

GraphQL API Reference

This directory contains comprehensive documentation for the Pyck GraphQL API. The documentation is organized by category to help you quickly find what you need.

## Structure

* [**Queries**](/graphql-api/queries.md): Operations for fetching data from the API
* [**Mutations**](/graphql-api/mutations.md): Operations for creating, updating, or deleting data
* [**Types**](/graphql-api/types.md): Object types and interfaces used in the API
* [**Enums**](/graphql-api/enums.md): Enumeration types that define restricted sets of values
* [**Scalars**](https://github.com/pyck-ai/docs/blob/main/graphql/scalars/README.md): Custom scalar types used in the API

## Core Concepts

### Pagination

Many queries return paginated results using the Relay connection specification. These queries typically accept `first`, `after`, `last`, and `before` arguments for pagination control, and return connection objects that include:

* `edges`: A list of edges, each containing a `node` (the actual object) and a `cursor`
* `pageInfo`: Information to aid in pagination, including `hasNextPage`, `hasPreviousPage`, `startCursor`, and `endCursor`
* `totalCount`: The total number of items in the connection

### Filtering

Most queries accept a `where` argument that allows filtering results by various criteria. The filtering options vary by object type but typically include equality comparisons, range comparisons, string operations, and more.

### Ordering

Most queries accept an `orderBy` argument that specifies the field and direction to sort results by.

### Data Types

The API extensively uses a flexible data model where many entities have a `data` field of type `Map` that can store arbitrary JSON data. This allows for entity customization without schema changes.

## Common Operations

* Fetching entities by ID: Use the appropriate node query (e.g., `nodeAttachments`, `nodeInventory`)
* Listing entities: Use the plural query name (e.g., `attachments`, `inventoryItems`)
* Creating entities: Use the appropriate creation mutation (e.g., `createAttachment`, `createInventoryItem`)
* Updating entities: Use the appropriate update mutation (e.g., `updateAttachment`, `updateInventoryItem`)
* Deleting entities: Use the appropriate delete mutation (e.g., `deleteAttachment`, `deleteInventoryItem`)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pyck.cloud/graphql-api/graphql.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
