Superagent integration

Find out how to integrate JSQL with Superagent

Stack requirements

The JSQL Superagent library will not work without an account in the JSQL cloud, a backend application (API) integrated with JSQL and integration with the tasks of the runner. To learn more see overview.

Installation

Install JSQL Superagent plugin to your project.

npm install jsql-superagent-plugin

Integration

Include JSQL Plugin in your App.js file.

import JsqlService from 'jsql-superagent-plugin';

Usage

First of all, you need to initiate JSQL object:

this.state = {
      reactJSQL: new JsqlService({
      host: 'https://mysite.com/'
      }),
      }

this.state.reactJSQL.jsql.delete('delete from person where age = 30')
      .then((res) => {
      console.log(res);
      }).catch((e) => {
      console.log(e);
      });

Close Menu