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:

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

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:

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

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.

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

Display top three ambassadors

Display the three most performant ambassadors with their Social Selling Index (SSI) scores and their invite acceptance ratios.

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

Last updated