@deep-foundation/react-hasura
v0.0.29
Published
[![npm](https://img.shields.io/npm/v/@deep-foundation/react-hasura.svg)](https://www.npmjs.com/package/@deep-foundation/react-hasura) [![Gitpod](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/d
Downloads
163
Maintainers
Keywords
Readme
Usage
Library
See Documentation for examples and API
usage
import providers and hooks
import { TokenProvider, useTokenController } from '@deep-foundation/deeplinks/imports/react-token';
import { ApolloClientTokenizedProvider } from '@deep-foundation/react-hasura/apollo-client-tokenized-provider';
control token
const [token, setToken] = useTokenController();
// you can use any token source after it
wrap page
// example from envs
export const GRAPHQL_PATH = `${process.env.NEXT_PUBLIC_HASURA_PATH}/v1/graphql`;
export const GRAPHQL_SSL = !!+process.env.NEXT_PUBLIC_HASURA_SSL;
return <TokenProvider>
<ApolloClientTokenizedProvider options={{ client: 'app-name', path: GRAPHQL_PATH, ssl: !!GRAPHQL_SSL, ws: !!process?.browser }}>
{children}
</ApolloClientTokenizedProvider>
</TokenProvider>;
Maintenance
Refresh package-lock.json
This command deletes node_modules
, package-lock.json
and runs npm i
. So everything is refreshed.
npm run package:refresh
Release a new version
npm run package:release
After that it might be required to release new versions of:
- https://github.com/deep-foundation/deeplinks