Facilitating the spread of knowledge and innovation in professional software development



Choose your language

InfoQ Homepage News restQL, a Microservices Query Language, Released on GitHub

restQL, a Microservices Query Language, Released on GitHub

Leia em Português

This item in japanese


restQL, a query language for microservices, is now available as an open-source project under an MIT license. The restQL language is intended to simplify common scenarios for client-side access to RESTful microservices, including multiple parallel calls and chained calls. Developed by B2W, the largest e-commerce operation in Latin America, restQL was created to avoid some limitations of the more well-known data querying and management frameworks Falcor and GraphQL.

While Falcor is only available to JavaScript clients, restQL is available to any client that supports REST calls over HTTP. This allows for its use in mobile apps written in Swift and Java. Although GraphQL is now a mature language for querying data, it doesn't provide some of the simple or well-established features available for RESTful services, such as HTTP response codes or native browser caching.

Similar to other querying languages, restQL statements describe the resources to retrieve, filtered by parameters. For example:

	from hero
        name = "Restman"

By default, queries are executed in parallel, without any special syntax. More complex, but common scenarios, such as chained or multiplexed calls (example below) are also straightforward.

	from hero
	        name = "Restman"
	from sidekick
	        hero =

Parsing and responding to restQL queries is handled by the restQL server. The server, implemented in Clojure, acts as a bridge between clients that submit restQL queries and backend APIs. Only configuration information is stored on the server, to pair resource names with the corresponding invocation endpoints. Because the restQL server exposes a standard REST endpoint, a specialized client is not required.

In a blog post announcing restQL, Ricardo Mayerhofer, IT Manager at B2W Digital, and one of the authors of restQL, said the project came about during the company's microservices migration. The development teams quickly benefitted from a move to microservices, with smaller applications to support, and corresponding easier maintenance. However, front-end code became more complex, having to orchestrate calls to multiple microservices, instead of a single, large call to the old monolith. Mayerhofer summarized their experience, saying, "A microservice-based architecture isn't a silver bullet. Despite its immediate benefits to the service teams, it poses by its very nature a challenge in terms of complexity and performance to the consumers." After considering Falcor and GraphQL, restQL was developed, and proved instrumental in simplifying client access to the multitude of backend services.

More information about restQL can be found at the project home page at The source code is available on GitHub.

We need your feedback

How might we improve InfoQ for you

Thank you for being an InfoQ reader.

Each year, we seek feedback from our readers to help us improve InfoQ. Would you mind spending 2 minutes to share your feedback in our short survey? Your feedback will directly help us continually evolve how we support you.

Take the Survey

Rate this Article


Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p


Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.