Getting Started

Getting Started with the GraphQL API

Introduction

This guide will help you get started with the pyck GraphQL API. You'll learn how to make your first query, understand the response format, and begin exploring the capabilities of the API.

Prerequisites

Before you begin, you'll need:

  • A pyck account with API access

  • Authentication credentials (JWT token or PAT)

  • A GraphQL client or HTTP client

Making Your First Query

Let's start with a simple query to get information about the current user:

query {
  me {
    id
    name
    email
  }
}

This query requests the ID, name, and email of the authenticated user.

Using curl

Using JavaScript

Understanding the Response

GraphQL responses always follow the same structure:

If there are errors, they'll be returned in an errors array:

Basic Query Examples

Listing Inventory Items

Creating an Inventory Item

Using Variables

GraphQL allows you to use variables for dynamic values:

With variables:

Next Steps

Now that you've made your first queries, you can:

  1. Explore the Schema Overview to understand available operations

  2. Learn about Authentication for secure API access

  3. Check out Error Handling for robust applications

  4. Dive into specific query and mutation documentation

Tools and Resources

Last updated

Was this helpful?