GraphQL API Introduction
· One min read
Get started with our new GraphQL API for more flexible data queries.
Why GraphQL?
GraphQL allows you to request exactly the data you need, reducing bandwidth and improving performance.
Getting Started
Endpoint
https://api.tanqory.com/graphql
Example Query
query {
products(first: 10) {
edges {
node {
id
title
price
variants {
id
sku
}
}
}
}
}
Mutations
mutation {
createProduct(input: {
title: "New Product"
price: 29.99
}) {
product {
id
title
}
}
}
Authentication
Use the same API key as REST API in the Authorization header.