https://github.com/rocketsgraphql/rocket-js-sdk
https://github.com/rocketsgraphql/rocket-js-sdk
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rocketsgraphql/rocket-js-sdk
- Owner: RocketsGraphQL
- Created: 2021-09-01T17:56:06.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-06-25T20:09:51.000Z (over 1 year ago)
- Last Synced: 2025-04-19T09:46:40.368Z (9 months ago)
- Language: JavaScript
- Size: 47.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rocket-js-sdk
This is a wrapper to API calls to your backend auth URL. This also takes care of periodically refreshing your auth tokens using an access token. To use it with Rocketgraph:
To Install:
```
npm i --save @rocketgraphql/rocketgraph-js-sdk
```
Usage:
```
import { createClient } from "@rocketgraphql/rocketgraph-js-sdk";
import Cookies from 'js-cookie';
const config = {
baseURL: "https://backend-1CBIJOG.rocketgraph.app/api",
};
const { auth } = createClient(config);
export { auth };
```
Now you have access to several functions like:
```
auth.getJWTToken()
```