This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

opvious-graph

0.2.4 • Public • Published

Opvious GraphQL API types NPM version

npm i opvious-graph

This package contains auto-generated types for Opvious' underlying GraphQL API. Consider also using the higher level SDK exported by opvious.

Quickstart

You'll need an Opvious API access token to call SDK methods. You can generate one at https://hub.opvious.io/authorizations.

import {GraphQLClient} from 'graphql-request';
import {getSdk} from 'opvious-graph';

// Underlying generic GraphQL client.
const client = new GraphQLClient('https://api.opvious.io/graphql', {
  headers: {authorization: process.env.OPVIOUS_TOKEN},
});

// Typesafe GraphQL SDK.
const sdk = getSdk(
  <R, V>(query: string, vars: V) => client.rawRequest<R, V>(query, vars)
);

Readme

Keywords

Package Sidebar

Install

npm i opvious-graph

Weekly Downloads

4

Version

0.2.4

License

Apache-2.0

Unpacked Size

236 kB

Total Files

7

Last publish

Collaborators

  • opvious-eng