Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

The following queries are SAMPLES. As a consumer of the Scope GraphQL API, you can design and use any properly formed query to retrieve the data that you require.

For more information, see “Introduction to the Scope GraphQL API“.

Use Case: Session Data Retrieval

Problem

As an analyst, I want to know which users have completed a particular Scenario so that I can issue credit to the users relating to the associated learning module in my system-of-record.

Solution

I will use a GraphQL client to retrieve Scenario Session data from the Scope GraphQL API which is not otherwise available in the Scope CMS user interface.

Procedure

...

  1. The GraphiQL client application is installed and configured to communicate with the Scope GraphQL API (see “Exploring the Graph”)

  2. The following query is executed:

    Code Block
    query {
      node(id: "INSERT_ID_OF_SCENARIO") {
        ... on Scenario {
          sessions {
            nodes {
              id
              state
              user {
                id
                name
              }
            }
          }
        }
      }
    }
  3. The JSON response is reformatted to CSV (using any relevant tool) for merge with system-of-record data and/or reporting.

Retrieving A Single Scenario Session’s Data

...