Nhost SDK is the primary way of interacting with your Nhost app. It exposes a standard interface for each of the following services:
While the Nhost SDK comes with a lightweight GraphQL client, you can connect to your Nhost backend with any GraphQL client of your choice. For complex applications, Apollo Client
, React Query
might be good options.
The SDK manages refresh tokens automatically to respect the permission rules of your Nhost apps. Requests will be anonymous by default, and when you use the SDK to log a user in, the permissions for that user will be used for GraphQL, storage and cloud function calls.
The SDK has TypeScript typings included. You don’t have to import types separately.