Accessing Playground

Accessing GraphQL playground

GraphQL playground is a visual too 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 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 at the previous step as a HTTP header of your GraphQL queries by opening the HTTP HEADERS panel at the bottom left of the GraphQL playground.

Paste in this section the Json object below customized with your own JWT token

{
"Authorization": "Bearer <Your JWT token>"
}

Browsing online documentation

You can discover all GraphQL API features by clicking the DOCS button at the top right corner of the screen.

If when opening the DOCS tab, only the context query is visible, it means your JWT authentication token is not valid.

Sample queries

To test sample queries below, copy and paste query content in the left hand side panel of the GraphQL playground, then click the Play button in the middle of the screen. The Json formatted result is outputted to the right hand 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 results.

query {
profiles {
findProfile(criteria: {fullName: "John D"}) {
key
firstName
lastName
}
}
}

Display contact details alongside his/her journey

Display contact details from his/her ID and display first name, last name, profil picture, followed by employer company name, number of employees and all the signals composing the contact's journey.

query {
profiles {
getProfile(key: "<Contact Key>") {
firstName
lastName
pictureUrl
company {
name
firmographics {
employeeCountRange
}
}
signals {
pillar
type
data
}
}
}
}

Display top 3 ambassadors

Display the 3 most performant ambassadors with their Social Selling Index (SSI) score and their invite acceptance ratio.

query {
dashboard {
getAmbassadorsRanking(count: 3) {
firstName
lastName
ssi {
score
}
invitesAcceptanceRatio
}
}
}