Fully typed TypeScript GraphQL clients for the GTR and Zworpshop APIs for Zeepkist.
Download the GTR mod for Zeepkist in Modkist (Zeepkist's Mod Loader) or on mod.io
Please note that as this is an ever green package that automatically updates types when it detects the GTR or Zworpshop schemas change, breaking changes may occur in minor releases.
<script type="module">
import { gtr, zworpshop } from 'https://esm.run/@zeepkist/graphql'
const gtrResponse = await gtr.query({
...
})
const zworpshopResponse = await zworpshop.query({
...
})
</script>
import { gtr, zworpshop } from 'https://esm.run/@zeepkist/graphql'
const gtrResponse = await gtr.query({
...
})
const zworpshopResponse = await zworpshop.query({
...
})
yarn add @zeepkist/graphql
# or with npm:
npm install @zeepkist/graphql
import { gtr, zworpshop } from '@zeepkist/graphql'
const gtrResponse = await gtr.query({
...
})
const zworpshopResponse = await zworpshop.query({
...
})
Enums can be imported from the specific service you are using, for example:
import { gtr } from '@zeepkist/graphql'
import { enumPlayerPointsOrderBy } from '@zeepkist/graphql/gtr'
const response = await gtr.query({
allPlayerPoints: {
__args: {
orderBy: [enumPlayerPointsOrderBy.POINTS_DESC]
}
}
})
To see all available exports and options, see the package documentation.
You will either need Node.js' CorePack enabled or an installation of pnpm to run this package locally. CorePack is recommended as it will automatically keep you updated with pnpm version the repository is using.
pnpm i
pnpm build
pnpm test
pnpm coverage
Lint with ESLint
pnpm lint
pnpm generate