Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pierrecabriere/graphand-js
https://github.com/pierrecabriere/graphand-js
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/pierrecabriere/graphand-js
- Owner: pierrecabriere
- License: mit
- Created: 2020-04-18T00:54:16.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-14T18:48:07.000Z (9 months ago)
- Last Synced: 2024-03-14T21:45:25.921Z (8 months ago)
- Language: TypeScript
- Size: 922 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Graphand javascript client
Graphand-js is the javascript sdk to integrate efficiently graphand.io within your apps.
## Getting started
### Create client
First, you need to create a graphand client for your project
```ts
import Graphand from "graphand-js";const client = Graphand.createClient({
project: "yourProjectId"
});
```### Get model
Then, your client can generate GraphandModel constructor to access your data
```ts
const Account = client.getModel("Account");
const Potatoes = client.getModel("Data:potatoes");
// or get multiple models at once
const [Account, Potatoes] = client.getModels(["Account", "Data:potatoes"]);Account.getCurrent().then((account) => alert(`Hello ${account.fullname} !`));
Potatoes.getList({}).then((list) => alert(`${list.count} potatoes in list !`));
```---
See [API reference](docs/README.md)
🚀