Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Use The ChromeiQL Extension For Google Chrome To Test GraphQL Queries

TwitterFacebookRedditLinkedInHacker News

As you probably know, I’ve been doing a lot with GraphQL recently. I’ve released tutorials that include Java with GraphQL, Node.js with GraphQL, as well as Golang with GraphQL, but I’ve only ever demonstrated testing those GraphQL APIs with cURL. If you’ve ever used cURL for anything, not specific to GraphQL, you’ll know it works well, but it isn’t the most friendly tool available.

We’re going to look at an alternative method to testing GraphQL queries using a convenient Google Chrome extension called ChromeiQL.

Let’s take a step back when it comes to GraphQL. If you’re familiar with Node.js and GraphQL you’re probably familiar with GraphiQL which is a UI to sit on your API for prototyping.

The problem with GraphiQL is that you need to either be using Node.js or you need to run it separately to your GraphQL application. While not the end of the world, it can become a bit of an inconvenience with your toolchains.

I’ve recently discovered ChromeiQL which solves the problem that I’ve had with the base GraphiQL client.

ChromeiQL for Google Chrome

As seen in the above screentshot, ChromeiQL is a full fledged GraphiQL client, but it is conveniently packaged as a Google Chrome extension. When you install the extension you can point it at your GraphQL API and begin executing GraphQL queries.

At the end of the day, it is important to remember that a UI tool like GraphiQL or ChromeiQL was designed for testing and exploring your GraphQL API. In a production environment you’d have your application execute GraphQL queries instead.

Nic Raboy

Nic Raboy

Nic Raboy is an advocate of modern web and mobile development technologies. He has experience in C#, JavaScript, Golang and a variety of frameworks such as Angular, NativeScript, and Unity. Nic writes about his development experiences related to making web and mobile development easier to understand.