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.
Click Data Sources on the QuickDEV homepage.
Click on "New data source" located in the upper right corner. Please note that this permission is restricted to workspace admins and developers.
Select APIs > GraphQL.
Adjust the general settings, providing at least the
Name
and the baseURL
of the API for connection purposes.Headers
andParameters
are optional.Configure Authentication Type.
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.
Connect GraphQL API to access to.
Within the query editor, select the option labeled + New.
Select the added API in Data source.
Write a query
Click ▶ Run.
Create a query with an existing data source
Within the query editor, locate and select the option labeled "+ New".
Select GraphQL Query in Data Sources.
Input the URL, Query, Variables, Parameters, and complete any other necessary fields as required.
Click ▶ Run.
Follow the steps to create a GraphQL query directly.
Last updated