@trufflehq/mothertree-client
This is the official client for Truffle's Mothertree API. It can be used both on the server and in the browser.
Installation
npm install @trufflehq/mothertree-client
Basic usage
import { MothertreeClient } from "@trufflehq/mothertree-client";
const client = new MothertreeClient({
accessToken: 'your-access-token',
url: 'https://mothertree.staging.bio/graphql'
});
client.userId
client.orgMemberId
client.orgId
await client.getOrgMember()
await client.getOrg()
await client.getRoles()