GraphQL API

GraphQL API

Latest Poppulo platform GraphQL API

Getting Started

Introduction

When developing applications / services that make use of Poppulo's systems, the Developer Portal will provide details of our APIs and how to use them. By using Poppulo's GraphQL APIs, developers can integrate their own applications / services with Poppulo's systems.

What is GraphQL

GraphQL is a data query and manipulation language that allows specifying what data is to be retrieved ("declarative data fetching") or modified. A GraphQL server can process a client query using data from separate sources and present the results in a unified graph.

Read more about GraphQL

Poppulo GraphQL API Basics

GraphQL Base URL

Poppulo provides two geo specific GraphQL endpoints for integrations. One is for US hosted customers and the other for EU hosted customers. Integrations should use the endpoint based on the location of where the Poppulo account is hosted. If you are uncertain as to which endpoint to use please contact your account manager.

Querying GraphQL

GraphQL is a mature technology with many tools for querying Poppulo's Graph. Apollo Graph has a cross-section of tools for a variety of development projects, see the following list as a starting point.

Query GraphQL with curl Example

If you are unable to use an existing package to query Poppulo's Graph, basic functionality can be achieved using a curl to make a standard HTTP request.

For example if you want to execute the following query:

query GetMyContentSettings {
  getMyContentSettings {
    emailAutoTranslateEnabled
    feedsAutoTranslateEnabled
    availableContentLocales
    defaultContentLocale
  }
}

You will need to include the following headers:

KeyValue
Content-Typeapplication/json
AuthorizationBearer Token

The body of the GraphQL query must match the following schema:

{
    "operationName": "string",
    "query": "string",
    "variables": "object"
}

With your generated access token (see Authorization for details) that would look similar to: _0XBPWQQ_c92da3c4-2add-4d23-9ee0-8593211800e4, the following curl command can be used to execute your query.

curl -X POST 'https://api.eu.poppulo-app.com/graphql' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer _0XBPWQQ_c92da3c4-2add-4d23-9ee0-8593211800e4' \
    -d '{"query":"query GetMyContentSettings {\n  getMyContentSettings {\n    emailAutoTranslateEnabled\n    feedsAutoTranslateEnabled\n    availableContentLocales\n    defaultContentLocale\n  }\n}","variables":{},"operationName":"GetMyContentSettings"}'

Next steps

Authorization