🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@opvious/api-operations

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opvious/api-operations

API GraphQL schema and operations resources

latest
Source
npmnpm
Version
0.10.3
Version published
Weekly downloads
55
1275%
Maintainers
1
Weekly downloads
 
Created
Source

Opvious API operations

This package contains auto-generated types for Opvious' GraphQL API. Consider also using our higher level SDK.

Quickstart

npm i @opvious/api-operations

You'll need an API access token to call SDK methods. You can generate one at https://hub.opvious.io/authorizations. Once you have it, you can use this package to emit type-safe API requests.

import {GraphQLClient} from 'graphql-request';
import {getSdk} from '@opvious/api-operations';

// 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)
);

Resources

This package includes the following resource files:

  • schema (resources/schema.gql);
  • supported operations (resources/operations/**/*.graphql).

Keywords

graphql

FAQs

Package last updated on 12 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts