Getting Started
Installation
Install package:
bash
# ✨ Auto-detect
npx nypm install @gqfn/core
bash
npm install @gqfn/core
bash
yarn add @gqfn/core
bash
pnpm install @gqfn/core
bash
bun install @gqfn/core
Generate Types from GraphQL Schema:
bash
npm run gqfn add https://your-graphql-endpoint
Import and use:
ts
import { useTypedSchema } from '@gqfn/core'
import { request } from 'graphql-request' // or any other GraphQL client
const gqfn = useTypedSchema('https://your-graphql-endpoint')
const query = gqfn([
'hello',
])
console.log(
await request('https://your-graphql-endpoint', query)
)