0.0.1-rc.1 • Published 2 years ago

@kodadot1/kodapi v0.0.1-rc.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@kodadot1/kodapi

npm version npm downloads Github Actions Codecov

GraphQL builder for KodaDot API

Usage

Install package:

# npm
npm install @kodadot1/kodapi

# yarn
yarn install @kodadot1/kodapi

# pnpm
pnpm install @kodadot1/kodapi

Import:

// ESM
import getClient from '@kodadot1/kodapi'

// CommonJS
const getClient = require('@kodadot1/kodapi')
const client = getClient('subquery')
const query = client.collectionListByIssuer('vikiival')

console.log(query)
{
  query: 'query  { collections: collectionEntities(filter: { issuer: { equalTo: vikiival } })  { nodes { id, metadata, currentOwner, issuer } } }',
  variables: {}
}

💻 Development

  • Clone this repository
  • Enable Corepack using corepack enable (use npm i -g corepack for Node.js < 16.10)
  • Install dependencies using yarn install
  • Run interactive tests using yarn dev

License

Made with 💛

Published under MIT License.