Defining GraphQL Tests as Text Files
When defining a GraphQL trigger, you are required to define a graphql
object containing the request Tracetest will send to your system. You also define: body
with query
, variables
and operationName
, url
, headers
, and SSLVerification
, and schema
.
trigger:
type: graphql
graphql:
url: ${env:GRAPHQL_URL}
headers:
- key: Content-Type
value: application/json
body:
# path to the query file or the query itself
query: ./query.graphql
variables: {}
operationName: ""
sslVerification: false
# path to the schema file or the schema itself
schema: ./schema.graphql