Calling GraphQL
cURL
curl -X POST -H "Content-Type: application/json" \
--data '{ "query": "{ myProfile { id program { name }}}" }' \
-H "Authorization: Bearer {TOKEN}" \
https://production.suggestic.com/graphqlFetch
require("isomorphic-fetch");
fetch("https://production.suggestic.com/graphql", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer {TOKEN}",
},
body: JSON.stringify({
query: `
{
myProfile {
id
program {
name
}
}
}`,
}),
})
.then((res) => res.json())
.then((res) => console.log(res.data));Apollo Client
PHP curl
Last updated
Was this helpful?