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: Operations for fetching data from the API
Mutations: Operations for creating, updating, or deleting data
Types: Object types and interfaces used in the API
Enums: Enumeration types that define restricted sets of values
Scalars: 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 anode(the actual object) and acursorpageInfo: Information to aid in pagination, includinghasNextPage,hasPreviousPage,startCursor, andendCursortotalCount: 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)
Last updated
Was this helpful?
