Querying content
How to extract published content out of Pokko
Last updated
How to extract published content out of Pokko
Last updated
To query content you will need to set up an API key. This can be done from the project settings screen.
Click the "New token" button under the "API Tokens" section.
Click the "GraphQL Playground" button to open a website where you can start querying content.
In this UI you will need to specify the token that was generated.
Click "HTTP Headers" down the bottom and enter the following
With this in place, you can start querying your content.
There are two ways of querying your content.
Querying individual pieces of content - entry()
Querying a list of content of a specific type - entries { }
The GraphQL root query has two queries to access your content - entry
and entries
More information about what queries are available can be found in the GraphQL Playground.
With entry
you can query individual entries by ID or by Path.
With entries
you can query multiple entries of a type.
A layer of caching is in place for the content querying endpoints. Content will be cached indefinitely until a change to your content is made. When a Publish occurs on an entry the cache will be cleared.
The more complex a GraphQL query is, the longer the initial request will take. Subsequent cached queries will be drastically faster.
POST
https://<region>.pokko.io/:project/:environment/graphql
This endpoint allows you to get free cakes.
Name | Type | Description |
---|---|---|
environment | string | |
project | string |
Name | Type | Description |
---|---|---|
X-Token | string |