Playground

    Suggestions will appear below the field as you type

    Playground

      Suggestions will appear below the field as you type

      Playground

      Playground

      SEEK provides a read-only Playground environment designed to approximate the production SEEK API. The Playground environment is populated with a mix of manually curated and automatically generated mock objects. This provides a number of benefits over testing against production:
      • None of the mock objects contain the personal information of real people. This eliminates the possibility of exposing sensitive data during testing.
      • The mock objects are in a variety of states that can be hard to find in production data. For example, there are mock candidate applications with every possible combination of attachments.
      • The curated mock objects have stable object identifiers and data. This makes it easy to perform repeatable tests against a known set of data.
      Due to its read-only nature, it’s not possible to execute mutations in the Playground environment. All mutations will fail with a FORBIDDEN error after they validate their input.

      Authentication

      As in production, all Playground requests require an access token. You can use your Playground credentials to request a partner token with the https://test.graphql.seek.com audience.
      A partner token can be requested from the command line on macOS, Linux or Windows Subsystem for Linux:
      Bash
      Copy
      curl --request POST \
       --url https://auth.seek.com/oauth/token \
       --header 'content-type: application/json' \
       --data '{"client_id":"Contact SEEK","client_secret":"Contact SEEK","audience":"https://test.graphql.seek.com","grant_type":"client_credentials"}'
      The provided token will expire in 24 hours at which point it will need to be re-requested.

      Accessing the Playground

      The Playground environment uses the same GraphQL endpoint as the production SEEK API: https://graphql.seek.com/graphql.
      Requests to the Playground are distinguished by their access token and scheme ID. Instead of using the seekAnz & global scheme IDs to refer to production, you would use seekAnzPublicTest & globalPublicTest in their place.

      Browser usage

      You can interactively query the Playground environment using the Developer Dashboard’s GraphQL Explorer .

      Running example queries

      There are examples of GraphQL queries throughout this documentation. Once you find an interesting query you can open it in the GraphQL Explorer using the button in the top right corner of the code block:
      GraphQL
      {
        version
      }
      Most example queries also include query variables in a second tab:
      QueryVariables
      query ($id: String!) {
        candidate(id: $id) {
          person {
            name {
              given
              family
            }
          }
        }
      }

      Customising example queries

      GraphQL allows you to write queries that combine data from multiple object types and data sources. For example, when exporting a candidate’s application you also have access to all of the fields on the associated job ad. It would not be practical or performant for the GraphQL server to return all possible fields for a given query. Instead, your software must explicitly select the fields it requires.
      The examples in this documentation will only select the fields required to illustrate the use of a feature. In most cases you’ll need to add or remove fields from the selection set to suit how it’s used in your software. This is easy to do from your browser using the GraphQL Explorer in combination with our schema documentation.
      After you open an example in the GraphQL Explorer, you’ll be able to interactively modify its selection set. The Playground’s online editor supports context-aware autocompletion and error highlighting. You can hover your mouse over the query’s fields to reveal their types and associated documentation.
      While the SEEK API schema documentation is available in the GraphQL Explorer, you may prefer our standalone schema documentation site. The site’s built-in search can be used to quickly look up a GraphQL type you see referenced in the GraphQL Explorer. Once you’ve found the appropriate type, it will show a complete list of the fields you can add to your selection set.

      Mock objects

      There are a number of manually curated mock objects available for testing. Refer to the mock objects documentation for a categorised list of available objects.