Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@nhost/nhost-js

nhost16.7kMIT3.3.0TypeScript support: included

Nhost JavaScript SDK

nhost, hasura, storage, auth, authentication, graphql, postgresql, realtime

readme

@nhost/nhost-js

Nhost JavaScript SDK

npm npm license: MIT

Documentation

Reference documentation

Install

npm install @nhost/nhost-js

# or yarn
yarn add @nhost/nhost-js

Initialise

import { NhostClient } from '@nhost/nhost-js'

const nhost = new NhostClient({
  subdomain: '<Your Nhost project subdomain>',
  region: '<Your Nhost project region>'
})

Features

GraphQL

Access Nhost GraphQL methods using nhost.graphql.

Authentication

Access Nhost Auth methods using nhost.auth.

Storage

Access Nhost Storage methods using nhost.storage.

Functions

Access Nhost Functions methods via nhost.functions.