open-index/open-npm huggingface dataset:
npm package: @platyplus/hasura-client
Description: Isomorphic Hasura client based on graphql-request
Latest version: 0.1.6

# `@platyplus/hasura-client`

Isomorphic Hasura client based on graphql-request

## Installation

```sh
yarn add @platyplus/hasura-client
```

## Usage

```js
import { Client } from '@platyplus/hasura-client'

const client = new Client({
  endpoint: 'your-hasura-endpoint/v1/graphql',
  secret: 'hasura admin secret'
})

// Requests can be either a string of GQL documents generated by gql-tag
const gqlRequest = 'query { ... }'
const variables = {}

client.request(gqlRequest, variables)
    .then(...)
    .catch(...)
```