quickslice

quickslice provides a GraphQL API for AT Protocol records, automatically generated from lexicon schemas.

Getting Started

The GraphQL endpoint is available at /graphql.

Interactive GraphiQL interface: /graphiql

Authentication

Mutations require a Bearer token in the Authorization header:

Authorization: Bearer <your-token>

Note: Authentication tokens are JWT bearer tokens generated by AIP (ATProtocol Identity Provider), an OAuth 2.1 authorization server. Tokens are obtained through OAuth flows and include ATProtocol identity claims.

Queries are public and do not require authentication.

Core Concepts

  • Records: AT Protocol records automatically mapped to GraphQL types
  • Queries: Fetch records with filtering, sorting, and pagination
  • Joins: Traverse relationships between records (forward and reverse)
  • Mutations: Create, update, and delete records
  • Blobs: Upload and reference binary data (images, files)

Quick Examples

Query Records

query {
  xyzStatusphereStatus {
    edges {
      node {
        uri
        status
        createdAt
      }
    }
  }
}

Create Record

mutation {
  createXyzStatusphereStatus(
    input: {
      status: "🎉"
      createdAt: "2025-01-30T12:00:00Z"
    }
  ) {
    uri
    status
  }
}

Upload Blob

mutation {
  uploadBlob(
    data: "base64EncodedData..."
    mimeType: "image/jpeg"
  ) {
    ref
    mimeType
    size
  }
}

Query with Joins

query {
  appBskyFeedPost(first: 10) {
    edges {
      node {
        uri
        text
        # Forward join: Get parent post
        replyToResolved {
          ... on AppBskyFeedPost {
            uri
            text
          }
        }
        # Reverse join: Get first 20 likes (paginated connection)
        appBskyFeedLikeViaSubject(first: 20) {
          totalCount  # Total likes
          edges {
            node {
              uri
              createdAt
            }
          }
        }
      }
    }
  }
}

Documentation

  • Queries - Fetching records with filters and sorting
  • Aggregations - Group by and count operations
  • Mutations - Creating, updating, and deleting records
  • Subscriptions - Real-time updates via WebSocket
  • Joins - Forward and reverse joins between records
  • Variables - Using GraphQL variables
  • Blobs - Working with binary data

Schema Introspection

You can explore the full schema using introspection:

query {
  __schema {
    types {
      name
      description
    }
  }
}