You can access your flags without an SDK by sending a GraphQL query to our low latency edge server.
Copy query TestQuery {
root {
exampleFlag
}
}
In the Result tab, you can see the flag that matches your query, including all of its logic.
Copy query TestQuery {
root(
context: {
environment : "DEVELOPMENT" ,
user : {
id : "test_id"
name : "Test"
email : "test@test.com"
}
}
) {
exampleFlag
}
}
Switch to the Code Snippets tab to see JavaScript and cURL snippets for the GraphQL query you entered.
JavaScript Example cURL Example
Copy /* Query: query TestQuery {
root(
context: {
environment: "DEVELOPMENT",
user: {
id: "test_id"
name: "Test"
email: "test@test.com"
}
}
) {
exampleFlag
}
}
Example Variables: {} */
function fetchConfigFromHypertune (variables) {
return fetch ( `https://edge.hypertune.com/graphql?token=YOUR_URL_ENCODED_TOKEN&body= ${
encodeURIComponent ( JSON .stringify ({
query: "query TestQuery { root( context: { environment: \"DEVELOPMENT\", user: { id: \"test_id\" name: \"Test\" email: \"test@test.com\" } } ) { exampleFlag } }",
variables : variables
}))
} ` , {
method : "GET" ,
redirect : "follow" ,
referrerPolicy : "no-referrer-when-downgrade" ,
keepalive : true
})
.then ((response) => {
return response .json ();
})
.then ((result) => {
if ( result .data) {
return result .data;
}
throw result;
});
}
Copy curl --location --request GET 'https://edge.hypertune.com/graphql?token=YOUR_URL_ENCODED_TOKEN&body=%7B%22query%22%3A%22query%20TestQuery%20%7B%20root%28%20context%3A%20%7B%20environment%3A%20%5C%22DEVELOPMENT%5C%22%2C%20user%3A%20%7B%20id%3A%20%5C%22test_id%5C%22%20name%3A%20%5C%22Test%5C%22%20email%3A%20%5C%22test%40test.com%5C%22%20%7D%20%7D%20%29%20%7B%20exampleFlag%20%7D%20%7D%22%2C%22variables%22%3A%7B%7D%7D'