public-roadmap
public-roadmap copied to clipboard
Support GraphQL Variables
Is your feature request related to a problem? Please describe. We're building a GraphQL Endpoint. Checkly allows using GraphQL Queries in API Tests. https://www.checklyhq.com/docs/api-checks/request-settings/ But in Checkly's UI, can't using GraphQL Variables.
Describe the solution you'd like Add a form to write GraphQL Variables.
Describe alternatives you've considered Using JSON body type as a workaround. But, this is painful for me.
@hiroingk thanks for contributing. Would you be able to give a concrete example of one of your GraphQL queries with the variables?
Hi @tnolet. Currently, this is the part we'd put in checkly's API body if the type is set to graphql
query GetTournament($id: UUID!, $previewMode: Boolean) {
publishedTournament(id: $id, previewMode: $previewMode) {
id
__typename
}
}
But we need to supply the following variables for that to be a valid query
{
"id": "f02743d7-de5c-4dd2-8ce0-09f76142902e",
"previewMode": false
}
Full body of request sent over the wire by graphql playground looks like this:
{
"operationName": "GetTournament",
"variables": {
"id": "f02743d7-de5c-4dd2-8ce0-09f76142902e",
"previewMode": false
},
"query": "query GetTournament($id: UUID!, $previewMode: Boolean) {\n publishedTournament(id: $id, previewMode: $previewMode) {\n id\n __typename\n }\n}\n"
}
any updates on this? currently we cannot use named query which takes variables.
Hey @adikari no updates right now. One question: are you using some other tool / platform right now to solve this problem for you (Postman, Insomnia or another monitoring platform?)
I was using postman and now moving to checkly. The checks in checkly use fine but without variable support I can't use named queries Nd it messes up my reporting. Checkly is hitting my endpoint every 5 mins and without named query my report is filled with queries without names.