Fully typed TypeScript GraphQL clients for Zeepkist, including GTR and Workshop GraphQL 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 schemas change, breaking changes may occur in minor releases.
<script type="module">
import { gtr, gtrBeta } from 'https://esm.run/@zeepkist/graphql'
const gtrResponse = await gtr.query({
...
})
const betaResponse = await gtrBeta.query({
...
})
</script>
import { gtr, gtrBeta } from 'https://esm.run/@zeepkist/graphql'
const gtrResponse = await gtr.query({
...
})
const betaResponse = await gtrBeta.query({
...
})
yarn add @zeepkist/graphql
# or with npm:
npm install @zeepkist/graphql
import { gtr, gtrBeta } from '@zeepkist/graphql'
const gtrResponse = await gtr.query({
...
})
const betaResponse = await gtrBeta.query({
...
})
Enums can be imported from the specific service you are using, for example:
import { gtr } from '@zeepkist/graphql'
import { enumUserPointsOrderBy } from '@zeepkist/graphql/gtr'
const response = await gtr.query({
allPlayerPoints: {
__args: {
orderBy: [enumUserPointsOrderBy.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
pnpm lint
pnpm generate