Graphqurl v1.0: curl for GraphQL
Tags: releases, graphql, opensource
Published: 2021-05-27 08:40:32

---
title: Graphqurl v1.0: curl for GraphQL
published: true
date: 2021-05-20 13:41:33 UTC
tags: Releases,GraphQL,OpenSource
canonical_url: https://hasura.io/blog/graphqurl-v1-curl-for-graphql/
---

 ![Graphqurl v1.0: curl for GraphQL](https://hasura.io/blog/content/images/2021/05/graphqurlgraphqlqurl.png)

![Graphqurl v1.0: curl for GraphQL](https://github.com/hasura/graphqurl/raw/main/assets/subscription.gif)

<!--kg-card-end: markdown-->

[Graphqurl](https://github.com/hasura/graphqurl) is a curl like CLI for GraphQL. Its features include:

- CLI for making GraphQL queries. It also provisions queries with autocomplete.
- Run a custom GraphiQL, where you can specify request's headers, locally against any endpoint.
- Can be used as a library with Node.js or from the browser.
- Supports subscriptions over websocket.
- Can export GraphQL schema(s).

* * *

## What's new in v1.0?

### Reduced bundle size

Graphqurl, until v0.3.3, used Apollo client under the hood for making GraphQL queries and subscriptions. This caused the bundle size to explode considerably (142kB).

![Graphqurl v1.0: curl for GraphQL](https://hasura.io/blog/content/images/2021/05/Screenshot-from-2021-01-20-21-27-38.png)<figcaption>Composition of graphqurl v0.3.3</figcaption>

With v1.0, Graphqurl uses light-weight isomorphic HTTP clients which reduced the bundle size by over 80kB, i.e by a whopping 56%. It is now an  ideal tool for use cases where users wish to make GraphQL queries, mutations and subscriptions without any extra overhead of caching and networking. This is what the new bundle composition looks like:

![Graphqurl v1.0: curl for GraphQL](https://hasura.io/blog/content/images/2021/05/Screenshot-from-2021-05-18-14-30-55-1.png)<figcaption>Composition of graphqurl v1.0.1</figcaption>

_Note that the size of the CLI binary is not considered in the above bundle size distribution. That said, the CLI binary in v1.0.1 has also been optimised and is about 300kB lighter than that of v0.3.3._

### Improved GraphiQL

You can run a custom Graphiql in graphqurl. In v1.0 we have extended it to include popular community tools like:

1. [Graphiql Explorer](https://github.com/OneGraph/graphiql-explorer)
2. [Graphql Code Exporter](https://github.com/OneGraph/graphiql-code-exporter)

You can also run graphiql on host and port of your choice by using the `--graphiqlHost` and `--graphiqlPort` flags on the CLI.

### Improved scripting API (breaking)

The parsing of GraphQL queries before execution, has been removed because it is unnecessary for a scripting tool like graphqurl, as most users build GraphQL queries through auto-completion tools like GraphiQL, which highly reduce the possibility of syntax errors. This means, the syntax errors in your GraphQL queries, if any, shall not be caught before the query actually hits the GraphQL server.

If you've been using graphqurl in node scripts and in the browser, the API has changed considerably. The usage of graphqurl as a node library v1.0 onwards involves creating a client followed by executing GraphQL operations, whereas until v0.3.3, you could import a `query` function and execute it.

Please find the updated API documentation in the [README](https://github.com/hasura/graphqurl) and a [sample script](https://github.com/hasura/graphqurl/blob/main/example/index.js) in the graphqurl repository.

The complete changelog can be found [here](https://github.com/hasura/graphqurl/blob/main/CHANGELOG.md) for complete list of changes in the latest release.

* * *

## What next?

Moving forward, we have the following things on the roadmap:

- [TypeScript support](https://github.com/hasura/graphqurl/issues/55)
- [Allow refreshing websocket connection if auth session expires](https://github.com/hasura/graphqurl/issues/90)
- [Allow subscribing to a GraphQL query through polling](https://github.com/hasura/graphqurl/issues/91)

Please [let us know](https://github.com/hasura/graphqurl/issues/new) what else you'd like to see on the roadmap. We are open to contributions, you can read our [contributing guide](https://github.com/hasura/graphqurl/blob/main/CONTRIBUTING.md) to help you get started.