Glossary
Last Updated Aug 07, 2021

RapidQL

Emma Jagger
Emma Jagger

Table of Contents:

Get your free
 API key now
stars rating
4.8 from 1,863 votes
See why the best developers build on Abstract
START FOR FREE
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
No credit card required

What is RapidQL?

Querying multiple APIs is a pain. RapidQL lets developers query multiple API resources at a time, combining them to create one unified Query.

RapidQL Commands

Querying

You can perform queries using the method rql.query().

rql.query(` { a } `, { a: 1, b: 2 }).then(console.log).catch(console.warn);

Logging

Similarly to querying, you can directly log the results of your query using the rql.log() method.

rql.log(` { a } `, { a: 1, b: 2 })

HTTP Requests

With RapidQL, you can also connect to any HTTP url using Http.get(). You may also use patch, post, and put requests.

``` const RapidQL = require('RapidQL'); const rql = new RapidQL({});

rql.log({ Http.get(url:"http://httpbin.org/ip") { origin } }); ```

More Parameters

An HTTP request in RQL can take many parameters beyond the url. The parameters include:

  • url: a fully qualified URI
  • body: entity body for PATCH, POST and PUT requests (not usable on GET requests)
  • form: data to pass for a multipart/form-data request (not usable on GET requests)
  • json: a boolean that when true, sets body to JSON representation of value and adds the
  • Content-type: application/json header (not usable on GET requests)
  • headers: HTTP headers (default: {})
  • bearer: an OAuth bearer token
  • basic: credentials for basic auth.

Conclusion

RapidQL lets developers query multiple API resources at a time, combining them to create one unified Query.

Frequently Asked Questions

What is RapidQL?

RapidQL is a query language that lets developers query multiple API resources at the same time and combine them into one unified query. It is provided as a JavaScript library that you include in your project with const RapidQL = require('RapidQL').

How does RapidQL work?

You write a single query and run it with rql.query(), or output the results directly with rql.log(). Within a query, RapidQL connects to HTTP endpoints using methods such as Http.get(), along with post, put, and patch for other request types.

What is RapidQL used for?

It is used to simplify workflows that involve several APIs. Instead of sending separate requests to each API and stitching the responses together by hand, you describe everything in one RapidQL query and get back a single combined result.

How does RapidQL handle authentication for API requests?

RapidQL requests support several authentication options, including OAuth bearer tokens, basic authentication credentials, and custom headers. You can also set the URL, request body, form data, and JSON formatting on a request.

What HTTP methods does RapidQL support?

RapidQL can connect to any HTTP endpoint using Http.get(), and it also supports post, put, and patch requests for sending and updating data.

Who created RapidQL?

RapidQL was created by RapidAPI, and its source is hosted on GitHub at github.com/RapidAPI/rapidql. To use it you install the RapidQL JavaScript library in your project.

Get your free
API
key now
stars rating
4.8 from 1,863 votes
See why the best developers build on Abstract
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
No credit card required