Skip to content
a-new-hope / 1.9.0

a-new-hope 1.9.0

Install from the command line:
Learn more about npm packages
$ npm install @kisacademics/a-new-hope@1.9.0
Install via package.json:
"@kisacademics/a-new-hope": "1.9.0"

About this version

@kisacademics/a-new-hope

This package provides a typescript client with utilities for interacting with the GraphQL API.

  • Typed GraphQL Schema
  • Typed Document Nodes for common GraphQL Operations
  • Utilities & Shared Types

Read the documentation here: https://kisacademics.github.io/a-new-hope-next/

Usage

The consumer of this package should implement their own GraphQL client with TypedDocumentNode compatiability. For a list of compatible clients see here: https://github.com/dotansimha/graphql-typed-document-node#built-in-support

import { GraphQLClient } from "graphql-request";

/**
 * Bring your own GraphQL Client
 */
const client = new GraphQLClient("http://localhost:8080/graphql", {
  headers: () => {
    return {};
  },
});

import { AccountsDocument } from "@kisacademics/a-new-hope";

/**
 * Use the Accounts Query.
 * The variables and the result are fully typed
 */
const result = await client.request(AccountsDocument, {
  // where: { ... },
  // skip: 0,
  // take: 1
});

console.log(result.accounts)

Details


Assets

  • a-new-hope-1.9.0.tgz

Download activity

  • Total downloads 2
  • Last 30 days 0
  • Last week 0
  • Today 0