Quick Start
This guide walks you through connecting a Shopify store to Comet Rocks and making your first catalog query. Total time: ~5 minutes.
Prerequisites
- A Shopify store (development store is fine)
- A Comet Rocks account — sign up at console.comet.rocks
Step 1: Create your Comet App
An App in Comet is the entity that holds your API credentials and connects to your shop systems.
- Log in to console.comet.rocks
- From the dashboard, click Apps in the left sidebar
- Click Create New App
- Give your app a name (e.g.
my-shopify-store) and click Create - Copy your API Key — it is shown only once, so save it now. You'll need it in the next step.
WARNING
Keep your API key secret. Never expose it in client-side code or public repositories.
You can also mint a key programmatically with the appClientGenerate mutation.
Step 2: Connect your Shopify store
- In your App settings, click Add Store
- Select Shopify as the platform
- Enter your Shopify store URL (e.g.
your-store.myshopify.com) - You'll be prompted to create a Custom App in your Shopify admin:
- Go to Shopify Admin → Settings → Apps and sales channels → Develop apps
- Click Create an app and name it
Comet Rocks - Under Configuration, enable these API scopes:
read_productsread_inventoryread_price_rules
- Click Install app and copy the Admin API access token
- Paste the Admin API access token into the Comet console and click Connect
Comet will perform an initial catalog sync. This takes 30–60 seconds for small catalogs.
Step 3: Make your first API call
Comet exposes a single GraphQL endpoint (Apollo Federation) — there is no REST API. Your endpoint is shown in the console and is:
https://api.comet.rocks/graphqlAuthenticate with your API key via the x-api-key header. (JWTs are also supported via Authorization: Bearer <token>.)
Test authentication
curl -X POST https://api.comet.rocks/graphql \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"query": "{ __typename }"}'Expected response:
{"data": {"__typename": "Query"}}Query your catalog
Fetch the first 10 products from your connected Shopify store:
query GetProducts($organizationId: ID!) {
productFind(
organizationId: $organizationId
pagination: { first: 10 }
) {
nodes {
id
name
sku
description
type
}
pageInfo {
hasNextPage
endCursor
}
}
}curl -X POST https://api.comet.rocks/graphql \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"query": "query GetProducts($organizationId: ID!) { productFind(organizationId: $organizationId pagination: { first: 10 }) { nodes { id name sku } } }",
"variables": { "organizationId": "YOUR_ORG_ID" }
}'TIP
Find your organizationId in the Comet console under Settings → Organization.
Step 4: Create a cart and add a product
# 1. Create a cart
mutation CreateCart {
cartCreate(input: {
organizationId: "YOUR_ORG_ID"
}) {
id
bags {
id
}
}
}# 2. Add a product to the cart
mutation AddProduct($cartId: ID!, $productId: ID!) {
cartAddProducts(input: {
cartId: $cartId
products: [{ productId: $productId, quantity: 1 }]
}) {
id
bags {
id
products {
productId
quantity
}
}
}
}Next steps
- Tutorial: Launch your first Checkout Store — build a full end-to-end flow
- Catalog API reference — full product search, filtering, and pagination
- Checkout flow — cart → addresses → shipping → payment → submit
- API Explorer — browse the live schema in the dashboard