Working with GraphQL
DocStar provides a dedicated interface for GraphQL requests, allowing users to send queries and mutations, explore API schemas, and define variables for dynamic requests.
Selecting GraphQL in DocStar
To enable GraphQL mode:
1. Open a new request tab.
2. Click the button labeled "HTTP" at the top left of the request heading.
3. Select GraphQL from the dropdown menu.
4. The interface updates, providing sections for Schema, Query, and Variables.
.png)
Understanding the GraphQL Interface
When GraphQL is selected, the request editor includes:
Schema Section – Displays available data fields, allows server URL entry for introspection, and includes a refresh option.
Query Section – A dedicated editor for writing queries and mutations with syntax highlighting for clarity.
Variables Section – Enables dynamic parameters in JSON format, avoiding hardcoded values.
.png)
Sending a GraphQL Request
Once the query is written and variables (if needed) are defined:
1. Click Send to execute the request.
2. DocStar will fetch data from the API and display the response.
Viewing the GraphQL Response
The response section in DocStar provides:
The response body with the requested data.
Errors, if any, such as invalid queries or missing fields.
Headers and status codes to track API performance.
DocStar makes working with GraphQL APIs effortless, providing a structured workflow for testing and documentation.
DocStar provides a dedicated interface for GraphQL requests, allowing users to send queries and mutations, explore API schemas, and define variables for dynamic requests.
Selecting GraphQL in DocStar
To enable GraphQL mode:
1. Open a new request tab.
2. Click the button labeled "HTTP" at the top left of the request heading.
3. Select GraphQL from the dropdown menu.
4. The interface updates, providing sections for Schema, Query, and Variables.
.png)
Understanding the GraphQL Interface
When GraphQL is selected, the request editor includes:
Schema Section – Displays available data fields, allows server URL entry for introspection, and includes a refresh option.
Query Section – A dedicated editor for writing queries and mutations with syntax highlighting for clarity.
Variables Section – Enables dynamic parameters in JSON format, avoiding hardcoded values.
.png)
Sending a GraphQL Request
Once the query is written and variables (if needed) are defined:
1. Click Send to execute the request.
2. DocStar will fetch data from the API and display the response.
Viewing the GraphQL Response
The response section in DocStar provides:
The response body with the requested data.
Errors, if any, such as invalid queries or missing fields.
Headers and status codes to track API performance.
DocStar makes working with GraphQL APIs effortless, providing a structured workflow for testing and documentation.