2๏ธGraphQL

GraphQL query language empowers the client to define the structure of the requested data, enabling the server to respond with data in the exact same structure. This approach guarantees that only the necessary data is fetched, thereby enhancing query efficiency. Introduction to GraphQL

Connect GraphQL API to QuickDEV

Follow these steps to connect to GraphQL APIs.

  1. Click Data Sources on the QuickDEV homepage.

  2. Click on "New data source" located in the upper right corner. Please note that this permission is restricted to workspace admins and developers.

  3. Select APIs > GraphQL.

  4. Adjust the general settings, providing at least the Name and the base URL of the API for connection purposes. Headers and Parameters are optional.

  5. Configure Authentication Type.

  6. Click Save

Authentication type

The default authentication type is None. Additional options include Basic and Digest, which necessitate the configuration of Username and Password.

SSL Cert Verification

In the advanced settings tab, you can configure SSL Certificate Verification for your data sources. Three options are available: CA (Certificate Authority) Certificate, Self-Signed Certificate, or Disabled. By default, QuickDEV accepts APIs with CA certificates for security reasons. For APIs lacking CA certificates, you can either choose "Verify Self-Signed Cert" and provide the self-signed certificate, or disable the SSL Certificate verification altogether.

Note that for a self-signed certificate, the information must be provided in .PEM (Privacy-Enhanced Mail) format. This certificate will be encrypted and securely stored in QuickDEV.

Forward cookies

Cookies can be leveraged to send REST API requests to services within the same domain. You have two options - either forward all cookies or specify particular cookies to forward in the text field. This functionality is useful when cookies are used to share common context, like identification data in JWT format, across multiple services. By forwarding cookies, you can maintain context across services called through the API.

Create a GraphQL query

Two distinct approaches can be used to build GraphQL queries:

  • add a new data source and then create a query

  • create a query directly

Please be aware that unless a new data source is established, the GraphQL data source won't be retained in your Data Sources, rendering it inaccessible for constructing additional queries.

Create a query with a new data source

Proceed by following the steps to introduce a novel GraphQL data source, and subsequently, you can initiate the process of crafting a query.

  1. Connect GraphQL API to access to.

  2. Within the query editor, select the option labeled + New.

  3. Select the added API in Data source.

  4. Write a query

  5. Click โ–ถ Run.

Create a query with an existing data source

  1. Within the query editor, locate and select the option labeled "+ New".

  2. Select GraphQL Query in Data Sources.

  3. Input the URL, Query, Variables, Parameters, and complete any other necessary fields as required.

  4. Click โ–ถ Run.

Follow the steps to create a GraphQL query directly.

Last updated