0.0.4 • Published 9 months ago

@basehub/kahdri v0.0.4

Weekly downloads
-
License
-
Repository
-
Last release
9 months ago

TypeScript SDK for https://basehub.ai.

Features

  • No codegen needed
  • Type completion & Type validation
  • No dependency on graphql
  • Works in browser, Node, Deno, Cloudflare workers, Bun and more

Usage

import { createClient } from '@basehub/kahdri'

const client = createClient({ token: process.env.BASEHUB_TOKEN })

client
  .query({
    _sys: {
      hash: true,
      id: true,
      slug: true,
    },
  })
  .then((data) => console.log(JSON.stringify(data, null, 2)))

client
  .query({
    homepage: {
      _sys: {
        createdAt: true,
        hash: true,
        id: true,
      },
      _title: true,
      heroBackground: {
        alt: true,
        aspectRatio: true,
        fileName: true,
      },
    },
  })
  .then((data) => console.log(JSON.stringify(data, null, 2)))

This client has been generated with Genql, you can read more about usage and features here.

Support

Contact support@basehub.ai for any feedback or questions.

0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago