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