@basehub/julianbenegas.blog
v0.0.1
Published
SDK client for basehub.ai GraphQL API
Downloads
3
Readme
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/julianbenegas.blog'
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)))
// query variables
let filter
let first = 3
client
.query({
blog: {
_sys: {
createdAt: true,
hash: true,
id: true,
},
blogPosts: {
__args: {
filter: filter,
first: first,
},
coverImage: true,
},
title: 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 [email protected] for any feedback or questions.