How to query the Supply API with Banana Cake Pop

Modified on Thu, 01 Sep 2022 at 02:58 PM

There are several GraphQL clients available such as Insomnia and Postman, but in this example, we will be using Banana Cake Pop!


To use Banana Cake Pop, go to https://api.nexar.com/graphql and click "browse schema", then apply. Now you are connected to the Nexar API. From here you can browse all query operations. To run a query, click on "Operations". 



Your page should now look like this.



OAuth2 Setup


OAuth2 gives you authorization to retrieve information from the Nexar API. To set up OAuth2, click on the settings icon in the top right of the screen. 



This overlay will then appear.



Click on the "Authorization" header.



Then select OAuth2 type. After selecting the type, you will need to change the grant type to Client Credentials. 



You will need to enter the Access Token URL, Client ID and Client Secret. 

Once this information is entered, you will need to scroll to the bottom and click "Fetch token".



Note: Your access token will expire so you will need to fetch another token when this happens. Next, click "Apply".



Now you are able to use Banana Cake Pop to query the Supply API.


How to run a query


Once your OAuth2 authorization is set up, you can enter a query and run it. To begin with, go to your operations tab.



Enter your query into the operations section. If you do not have a query to use, here is an example query of searching for different categories in the supply database.


query Categories {
  supCategories {
    id
    name
    path
    numParts
  }
}



Once you have entered your query, you can run it by clicking "Run".



When the query is executed, all the results will be displayed on the right.



That is how to query the Supply API with Banana Cake Pop!

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article