Altair GraphQL Client v4 now available

March 25, 2021

Altair v4 has been released! It is a mojor update that comes with several signifant changes as well as other small improvements and fixes in the application.

Starting with the JS framework itself, we have migrated from angular v9 to angular v11 (the latest version at the time of this release) #1461. This brings with it all the goodies from both version 10 and 11, which includes (among other things) a faster, more performant application overall. In the process we also updated ant design framework to v11, ngrx to v11 and several other packages.

As part of the performance improvements, we migrated from using localStorage to store and manage data, and instead we store data in indexedDB #1483. Given the synchronous nature of localStorage, it blocks the main thread whenever it stores data. We managed to improve this thread blocking issue by deferring writes using the requestIdleCallback API but that didn’t completely eliminate the blocking issue. It becomes even more obvious when dealing with very large schema setups. IndexedDB has an asynchronous API meaning it doesn’t block the thread when writing or reading from storage. This leads to a more fluid and consistent user experience… and a much BIGGER storage (now you can use Altair to load up that 1GB schema 😄)!

We introduced Post request scripts #1467 which enables you perform logic on the result of your query. Assuming you want to run a mutation query to login your user and retrieve the auth token, using the post request script you can now retrieve the token from the response altair.response.body.data.login.token and set it in the currently active environment variable altair.helpers.setEnvironment('auth_token', token, true) and use the variable in the headers to authenticate subsequent requests! We also introduced response headers that come with the response from the server. This enables easier debugging with regards to the headers. One important note about the response headers: the returned response headers in the browser clients (web app, browser extensions) are limited. However these response headers show up in the desktop apps.

altair with tabs

With all the new feature additions, we added tabs to the query and result sections to better manage the components. This also enables us have better management of the sections than was possible before. Now you can view the results of a subscription query even after running a subscription.

proxy settings in Altair

On the desktop apps, you can now configure the proxy settings of Altair #1475. This includes choosing to use the system proxy settings, using a manual proxy setting or via a PAC script, or not using any proxy at all.

A new setting (response.hideExtensions) has been added to allow hiding the extensions data that gets returned from some servers.

Other improvements include: using JetBrains mono as the default editor font, updating the variable highlighting and implementation in text inputs, several other bug fixes and minor improvements.

This was originally planned to be a minor version release (v3.3.0) but given the number of complex changes being introduced, it made sense to bump it up to a major release instead. Hope you guys enjoy this update and find it very useful.

If you experience any issue in this update or just want to holla, you can reach out to us on twitter or on github.

Ps: We are always open to contributions in various ways. You can learn more here🚀 or donate to the project here🥰.


Did you find this useful? Do you think there are better approaches to take, or questions? You can reach out to me on twitter @imolorhe.

Write about what you learn. It pushes you to understand topics better.

Sometimes the gaps in your knowledge only become clear when you try explaining things to others. It's OK if no one reads what you write. You get a lot out of just doing it for you.


Articles by Samuel Imolorhe. I am a web developer who likes building useful things and sharing what I learn with the community. Follow me on Twitter

© 2021, Built with Gatsby
Back to top ↑