npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@gqlkit-ts/cli

v0.5.0

Published

Just types and functions — write TypeScript, generate GraphQL.

Readme

gqlkit

Just types and functions — write TypeScript, generate GraphQL.

gqlkit Documents NPM Version License

How it works

  1. Write TypeScript types in src/gqlkit/schema/ → become GraphQL types
  2. Write resolver functions using defineQuery, defineMutation, defineField → become GraphQL resolvers
  3. Run gqlkit gen → outputs typeDefs and resolvers to src/gqlkit/__generated__/

Highlights

  • Implement first - Write types and resolvers, generate schema when ready. No edit-regenerate-implement loops.
  • Just types and functions - Plain TypeScript with a thin API. No complex generics, no decorators.
  • Type-safe - TypeScript types become GraphQL types. Resolver signatures checked at compile time.

Getting started

1. Install dependencies

# Runtime dependencies
npm install @gqlkit-ts/runtime graphql @graphql-tools/schema

# Development dependency
npm install -D @gqlkit-ts/cli

2. Create types and resolvers

// src/gqlkit/gqlkit.ts
import { createGqlkitApis } from "@gqlkit-ts/runtime";
import { Context } from "./context.js";

export const { defineField, defineQuery, defineMutation } = createGqlkitApis<Context>();
// src/gqlkit/schema/task.ts
import type { IDString, NoArgs } from "@gqlkit-ts/runtime";
import { defineQuery, defineMutation } from "../gqlkit.js";

export type Task = {
  id: IDString;
  title: string;
  completed: boolean;
};

const tasksData: Task[] = [];

// Query
export const tasks = defineQuery<NoArgs, Task[]>(() => tasksData);

// Mutation
export const createTask = defineMutation<{ input: { title: string } }, Task>(
  (_root, { input }) => {
    const task: Task = {
      id: crypto.randomUUID(),
      title: input.title,
      completed: false,
    };
    tasksData.push(task);
    return task;
  }
);

3. Generate schema and resolvers

gqlkit gen

This generates:

  • src/gqlkit/__generated__/typeDefs.ts - GraphQL schema AST
  • src/gqlkit/__generated__/resolvers.ts - Resolver map
  • src/gqlkit/__generated__/schema.graphql - SDL file

4. Create the executable schema

// src/schema.ts
import { makeExecutableSchema } from "@graphql-tools/schema";
import { typeDefs } from "./gqlkit/__generated__/typeDefs.js";
import { resolvers } from "./gqlkit/__generated__/resolvers.js";

export const schema = makeExecutableSchema({ typeDefs, resolvers });

5. Start a GraphQL server (e.g., Yoga)

npm install graphql-yoga
// src/server.ts
import { createServer } from "node:http";
import { createYoga } from "graphql-yoga";
import { schema } from "./schema.js";

const yoga = createYoga({ schema });
const server = createServer(yoga);

server.listen(4000, () => {
  console.log("Server running at http://localhost:4000/graphql");
});

Run the server and open http://localhost:4000/graphql to access GraphiQL:

mutation {
  createTask(input: { title: "Learn gqlkit" }) {
    id
    title
    completed
  }
}

query {
  tasks {
    id
    title
    completed
  }
}

Documentation

For detailed usage, features, and API reference, visit the documentation site:

https://gqlkit.izumin.dev