> 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/scalars.md).

# Scalars

Custom and standard scalar types used throughout the pyck GraphQL API

Audience: Programmer

Scalar types represent the leaf values in a GraphQL type system. pyck uses both standard GraphQL scalars and custom scalars for specialized data types.

## Standard Scalars

GraphQL provides these built-in scalar types:

* **ID** - Unique identifier (serialized as String)
* **String** - UTF-8 character sequence
* **Int** - 32-bit signed integer
* **Float** - Double-precision floating-point value
* **Boolean** - true or false

## Custom Scalars

pyck defines additional scalar types for specific use cases:

### Time and Date

* [**Time**](/graphql-api/scalars/time.md) - RFC3339 formatted timestamps with timezone information

### Data Structures

* [**Map**](/graphql-api/scalars/map.md) - JSON object for storing custom data
* **Any** - Arbitrary JSON value

### Identifiers

* [**UUID**](https://github.com/pyck-ai/docs/blob/main/graphql/scalars/UUID.md) - Universally unique identifiers
* [**Cursor**](https://github.com/pyck-ai/docs/blob/main/graphql/scalars/Cursor.md) - Opaque pagination cursors for relay-style pagination

### Federation

* [**Federation Scalars**](/graphql-api/scalars/federation-scalars.md) - Scalars required for Apollo Federation

## Usage Examples

### Time Scalar

```graphql
query {
  inventoryItems(
    where: {
      createdAt_GTE: "2024-01-01T00:00:00Z"
    }
  ) {
    edges {
      node {
        createdAt  # Returns Time scalar
      }
    }
  }
}
```

### Map Scalar

```graphql
mutation {
  updateInventoryItem(
    input: {
      id: "123"
      data: {  # Map scalar
        "color": "red",
        "size": "large"
      }
    }
  ) {
    inventoryItem {
      data
    }
  }
}
```

### UUID Scalar

```graphql
query {
  node(id: "550e8400-e29b-41d4-a716-446655440000") {  # UUID
    ... on InventoryItem {
      sku
    }
  }
}
```

## Validation

Custom scalars include built-in validation:

* **Time** - Must be valid RFC3339 format
* **UUID** - Must be valid UUID v4 format
* **Map** - Must be valid JSON object
* **Cursor** - Must be base64 encoded

## See Also

* [Input Types](/graphql-api/inputs.md) - Complex input types
* [Types](/graphql-api/types.md) - Object types that use scalars


---

# 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/scalars.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.
