Altair GraphQL Client is a simple and very useful tool to have in your GraphQL utility belt. It enables you as a developer working with GraphQL to quickly and easily test GraphQL queries and implementations. It also comes with a number of features that help in the development process as well. I would be mentioning a couple of the features that I think would be useful for GraphQL developers.

Renaming windows

If you have used Altair before, I’m sure you already know that you can create multiple windows for running and testing multiple queries. What you might not know is that you can rename the windows to provide context as to what kinds of queries you are testing in that window. Simple double-click the window name, and you can edit the name of the window. Alternatively, you can right-click the window name and click the “Edit” option.

Toggle the side menu

Depending on your screen size, the side menu might take up more space than you need. You could always collapse the side menu whenever you like by clicking the arrows at the top left corner of the side menu.

Resize Layout

Due to popular demand, it is possible to resize the layout for the query, result and the doc viewer. This can be useful based on what aspect of the GraphQL you might be working on at any point in time. Simply drag the resize handles from left to right to adjust the width of the columns. Easy right?

Import query from a cURL command

This feature is not fully tested at the moment (still more or less in beta) but you can import a cURL command into a new window in Altair. This helps you easily transition from working from a cURL command in your (or your team member’s) CLI to working in Altair. You can do this from the cog menu at the top right of the app, and clicking the “Import from cURL” option.

Customizing indentation size

Spaces vs tabs everyone! 😄 Okay not exactly. Different developers have varying preferences in terms of the size of indentations when writing code (mostly 2 and 4). Altair allows you customize the tab size from the default tab size of 4, so you can use whatever tab size you want! Tab size of 3, anyone? 😏

Light or dark theme

Every developer has a preference of a light or a dark theme in the interfaces and tools they interact with. Altair allows you choose between a light and a dark theme option depending on what you want. You can always set this in the “Settings” which you can access from “Cog menu at the top right > Settings”.

Interface localization

Would you rather read Spanish than English? Or maybe French? Altair allows you change the language of the interface so you’re not completely stuck with English. You can always set this in the “Settings” which you can access from “Cog menu at the top right > Settings”.

The language translations are done by the community and there’s still more translations that can be done, and more languages that can be added, and we would need your help to do that. If you would like to help with that, you are welcome to create a PR, or join us on crowdin to translate to your language.

Import / Export windows

When you’re working within a team, you would likely come into scenarios where you want to share the current queries that you’re working with to other team members. Also you might want to export queries for safekeeping and sharing with new team members. You can easily export windows in Altair to .agq files that can be stored and shared. The export option is available at the bottom of the side menu, while the import option is available in the cog menu at the top right of the app.

Running subscription queries

Subscriptions are a very powerful and useful aspect of the GraphQL spec, allowing you get realtime updates of data changes in your apps. Altair helps you easily test subscription queries. Just add your subscription query and send the request as you would normally do. Altair would show the realtime updates in the results pane with an option for you to stop the subscription. You also get a notification if there is an update when you’re not looking at the app.

Download result

One other little feature in Altair is the ability for you to download the result of running a query to a JSON file. This could be useful for quickly saving data you could use as mock data when testing and developing different aspects of your GraphQL API.

Bonus Tip: Set Add query limit

One of the most useful feature of Altair is the ability to add a query directly from the doc viewer into the query editor with a click of a button. This allows you quickly scaffold a query to start working with. However by default, there is a limit to how much nesting the generated query would contain. This is due to performance reasons. However, if you’re confident in your schema and how large it is, you can increase the limit of the nesting to a higher number to create a deeper nested query. You can always set this in the “Settings” which you can access from “Cog menu at the top right > Settings”.

Conclusion

These are some of the things you can do in Altair to make your development workflow a lot easier for you. There are still many more things you can do that aren’t mentioned here though, but these are some of the useful ones you might not have known about. Do you think there’s a feature missing? Don’t forget to let us know. You are also free to contribute too!

✌🏾