Postman
Prerequisites:
Using Postman to Call the API
Set Up a Request:
Create a new POST request in Postman.
Use the same endpoint as Apollo Sandbox.

Add Authorization:
In the Authorization tab, select Bearer Token.
Paste your API key into the token field.

Check the Headers:
The headers will show a predefined Authorisation.

Define the Body:
Go to the Body tab. Select the "raw" option. In the input enter the "operationName" and "variables" as we have defined in the Apollo Sandbox.

Use the "query" in the "Operation" section of Apollo Sandbox and convert it into a single-line string. You can use this tool to convert the query from multi-line to single-line.

The single line query will look like this:
query Projects($organization: String!) {\n projects(organization: $organization) {\n data {\n organizationId\n name\n }\n }\n}
Provide necessary variables (e.g.,
organization ID
) in the payload. The final query will look something like this:
{
"operationName": "Projects",
"variables": {
"organization": "<Org-ID>"
},
"query": "query Projects($organization: String!) {\n projects(organization: $organization) {\n data {\n organizationId\n name\n }\n }\n}"
}

Send the Request:
Execute the request by clicking on "Send" to receive JSON responses similar to the Apollo Sandbox.

Last updated