How to query your first data?
Know what you query
Basically, you can just get what you can query with the introspection request.
A good way to play with our graphQL API is to try it with Altair GraphQL Client.
Tuto to use graphQL API with Altair GraphQL Client
Download the software at https://altair.sirmuel.design/
Set the corresponding configuration :
- Setup the graphQL url (https://graphql.switchy.io/v1/graphql)
- Put the Api-Authorization header and put your corresponding token.
- Reload the docs, to have the graphQL schema corresponding to your access.
- (Optional but awesome), In the settings part, you can activate the experimental mode and add the altair-graphql-plugin-graphql-explorer plugin. It will allow you to write your graphQL queries and mutations with few clicks.
Get some datas corresponding to the token with one single query
query SomeDatas {
workspaces {
companyName
activateRgpdEverywhere
createdDate
id
name
}
domains(where: {removedDate: {_is_null: true}}) {
createdDate
name
}
}