Developers
Search…
Accessing Playground

Accessing GraphQL Playground

GraphQL Playground is a visual tool to configure and execute GraphQL queries right from your web browser. You can generate and use an authentication token to access your own data. You can discover all of the Stent GraphQL API features by browsing the online documentation. Export your queries as Curl commands to test them in Postman, or start developing with your own language.
GraphQL playground is available at https://graph.stent.io/graphql/playground.

Configuring authentication

Before getting access to your workspace data, you should use the JWT token you generated in the previous step as an HTTP header of your GraphQL queries by opening the HTTP HEADERS panel at the bottom left of GraphQL playground.
In this section, paste the JSON object below customized with your own JWT token:
1
{
2
"Authorization": "Bearer <Your JWT token>"
3
}
Copied!

Browsing online documentation

You can discover all of the GraphQL API features by clicking the DOCS button at the top right corner of the screen.
If only the context query is visible when opening the DOCS tab, it means that your JWT authentication token is not valid.

Sample queries

To test sample queries below, copy and paste query content in the left side panel of GraphQL Playground, then click the Play button in the center of the screen. The JSON-formatted result is outputted to the right side panel of the GraphQL Playground.

Find contacts by name

Find all contacts whose name start with John D, then output ID, first name and last name for each result:
1
query {
2
profiles {
3
findProfile(criteria: {fullName: "John D"}) {
4
key
5
firstName
6
lastName
7
}
8
}
9
}
Copied!

Display contact details alongside their journey

Display a contact's details from their ID and display their first name, last name, and profile picture, followed by employer company name, number of employees and all the signals that make up the contact's journey.
1
query {
2
profiles {
3
getProfile(key: "<Contact Key>") {
4
firstName
5
lastName
6
pictureUrl
7
company {
8
name
9
firmographics {
10
employeeCountRange
11
}
12
}
13
signals {
14
pillar
15
type
16
data
17
}
18
}
19
}
20
}
Copied!

Display top three ambassadors

Display the three most performant ambassadors with their Social Selling Index (SSI) scores and their invite acceptance ratios.
1
query {
2
dashboard {
3
getAmbassadorsRanking(count: 3) {
4
firstName
5
lastName
6
ssi {
7
score
8
}
9
invitesAcceptanceRatio
10
}
11
}
12
}
Copied!