Skip to main content

GraphQL


GraphQL is a modern API query language and runtime that allows clients to request exactly the data they need, making data fetching more efficient and flexible. Unlike traditional REST APIs, GraphQL uses a single endpoint, a strongly typed schema, and supports features like real-time updates, version-free evolution, and nested data queries. Its declarative approach enables streamlined communication between clients and servers, enhancing application performance and development agility.

Key Features​

  • Declarative Data Fetching: Request exactly the data you need.
  • Single Endpoint: Interact with all resources through one endpoint.
  • Strongly Typed Schema: Define clear, self-documenting contracts between client and server.
  • Version-Free API: Evolve APIs without breaking changes.

GraphQL

Methods to Add GraphQL​

You can add a GraphQL to your application through the following methods:

From Main Screen​

  1. Access the main screen of the application.
  2. Click the "Add GraphQL" button for a quick setup.

GraphQL

From the Left-Panel Section​

  1. Open the application.
  2. Click the "+" icon on the left panel.
  3. Choose "Add GraphQL" from the dropdown.

GraphQL

From the Collection Section​

  1. Open the application.
  2. Click the "Collection/Folder" option in the left panel.
  3. Click on the three dots and select "Add GraphQL."

GraphQL

Using the GraphQL Icon in the Collection Section​

  1. Access the left panel's "Collection" option.
  2. Click on the GraphQL icon to add a new connection.

GraphQL

How to Connect to GraphQL​

  1. Enter Connection Details: Input the GraphQL URL.
  2. Query Explorer: Once you enter the GraphQL URL, queries will be fetched automatically. You can select a query from the list, which will be displayed in the Query Editor section. Additionally, multiple queries can be selected simultaneously.
  3. Variables: Add variables manually as per the requirements.
  4. Connect: Click the "Query" button after entering all the details.
  5. Confirmation: A confirmation message will appear on the right side once the connection is successful.
  6. Response: The response will be generated at the RHS, including Body & Headers.

GraphQL

Using Copy, Download Options, Clear Query and Refresh Schema​

  • Copy Response: Use the "Copy" icon to copy the response; a confirmation message will appear.
  • Download Response: Click the "Download" icon to save the response; choose your file location and confirm.
  • Clear Query: Click on the "Clear Query" icon to clear the query input.
  • Refresh Schema: Click on "Refresh Schema" icon to refresh the generated schema & update the schema as per the changes made.

GraphQL

Saving GraphQL for Future Use​

  1. Save Connection: After setting up, click "Save."
  2. Select Collection: Choose or create a collection to store the GraphQL connection.
  3. Choose Folder: Similarly, choose or create a folder.
  4. Confirm Save: Click "Save" to store the connection for future use.

GraphQL