GraphQl

GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.

Of course, Testlum can test GraphQL queries.

GraphQL Integration

Description

<graphqlIntegration> - command for integration with GraphQL

Required parameters

  1. alias - unique name of the integration
  2. url – URL to GraphQL API
  3. enabled – boolean flag to enable/disable integration (can be “true” or “false”)

All you need is to integrate with API by providing alias, the URL to the API, and enable the integration by switching the boolean flag to “true” in the integration.xml file.

XML
Copy

How to send the query

Description

<graphql> – command which is responsible for sending the GraphQL queries in testing scenarios

Required parameters

  1. Comment
  2. Alias
  3. Post or Get method

Required params for post method:

  1. endpoint

  2. body:

    1. from – file
    2. raw – string
  3. response:

    1. code (default 200)
    2. file
    3. header (optional)
      1. name
      2. data

Required params for get method:

  1. endpoint

  2. param:

    1. name
    2. body
  3. response:

    1. code (default 200)
    2. file
    3. header (optional):
      1. name
      2. data

Optional params for post/get methods:

  1. Header:
    1. name
    2. data
  1. response
  2. header
  3. body/param
XML
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard