@chain-runners/api-client
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

@chain-runners/api-client

This package uses graphql-code-generator to generate a typed API client for the Chain Runners GraphQL API at https://api.chainrunners.xyz/graphql. The client generated is a graphql-request Client that makes the GraphQL requests using the generated functions.

Usage

import { getChainRunnersAPIClient } from "@chain-runners/api-client"

async function main(): Promise<void> {
  const client = getChainRunnersAPIClient()
  const response = await client.getRunnerById({ id: "780" })
  console.log(response.token?.dnaHexString)
}

main()

Functions

Will expand this documentation over time, for now either utilize intellisense in your editor or check out the types in src/generated.ts starting on line 410 to see what functions are available.

Dependencies (3)

Dev Dependencies (7)

Package Sidebar

Install

npm i @chain-runners/api-client

Weekly Downloads

1

Version

0.2.1

License

ISC

Unpacked Size

47.8 kB

Total Files

10

Last publish

Collaborators

  • cr-devs