GraphQL quickstart

You can access your flags without an SDK by sending a GraphQL query to Hypertune Edge.

1. Write a GraphQL query

Go to the Preview view in the Hypertune UI and enter the following GraphQL query:

query TestQuery {
  root {
    exampleFlag
  }
}

In the Result panel, you can see the flag that matches your query, including all of its logic.

Now pass the context argument, containing the environment and user, in the query:

query TestQuery {
  root(
    context: {
      environment: "development",
      user: {
        id: "test_id"
        name: "Test"
        email: "[email protected]"
      }
    }
  ) {
    exampleFlag
  }
}

Now your flag logic has been reduced, i.e. the "If / Else" expression has been replaced with its result.

2. Get code snippets

Switch to the Code Snippets tab to see cURL and JavaScript snippets for the GraphQL query you entered.

Last updated