GraphQL reference
Linkstacked is GraphQL-first. Every dashboard surface uses the same endpoint, schema, and auth context as the public API.
Endpoint
POST https://api.linkstacked.com/graphqlHeaders:
| Header | Value |
|---|---|
Authorization | Bearer <your access token> |
Content-Type | application/json |
X-Apollo-Op | optional, helps us debug rate-limit errors |
Request body — the GraphQL convention:
{
"query": "query Me { me { _id email } }",
"variables": {},
"operationName": "Me"
}Try it live
The Apollo Sandbox below points at the API endpoint your client is currently configured for. Use the Operation pane to compose a query, hit Run, and copy the raw HTTP request from the Request tab into your code.
Schema essentials
Every type extends Node (an opaque _id string) and uses ISO 8601
strings for date fields. Pagination arguments are uniform:
input PaginationInput {
page: Int = 1
limit: Int = 20
}
type ArticlePage {
items: [Article!]!
total: Int!
page: Int!
limit: Int!
}A handful of unions — Notification, AnalyticsRow — surface
heterogeneous collections; resolve them with __typename switching the
same way you would in any other GraphQL client.
Errors
Linkstacked emits structured GraphQL errors with extensions.code:
code | Meaning |
|---|---|
UNAUTHENTICATED | No or invalid auth header. |
FORBIDDEN | Token is fine, but you can't perform the action. |
NOT_FOUND | Resource does not exist (or you can't see it). |
BAD_USER_INPUT | Validation error; check extensions.fields. |
RATE_LIMITED | Slow down; X-RateLimit-* headers tell you how. |
INTERNAL | Hold on, our pager just went off. |
BAD_USER_INPUT carries a fields array with the offending paths so
you can render inline form errors without parsing strings.