New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@comity/graphql

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@comity/graphql

A [Hono](https://hono.dev) middleware for handling GraphQL requests, seamlessly integrated with [Envelop](https://the-guild.dev/graphql/envelop) to provide enhanced GraphQL server capabilities.

latest
Source
npmnpm
Version
0.4.8
Version published
Maintainers
3
Created
Source

Comity Graphql Handler

A Hono middleware for handling GraphQL requests, seamlessly integrated with Envelop to provide enhanced GraphQL server capabilities.

Features

  • High Performance: Built on Hono, ensuring minimal overhead and blazing-fast performance.
  • Extensible: Leverage Envelop plugins to enhance your GraphQL server with features like caching, tracing, error handling, and more.
  • Lightweight: Designed to be simple and efficient, with a focus on developer experience.

Installation

# with NPM
npm install @comity/graphql
# or with YARN
yarn add @comity/graphql
# or with PNPM
pnpm add @comity/graphql

Usage

import { Hono, type Context } from 'hono';
import {
  buildSchema,
  execute,
  parse,
  subscribe,
  validate,
  specifiedRules,
} from 'graphql';
import { graphqlHandler } from '@comity/graphql';
import { useLogger, useEngine, useSchema } from '@envelop/core';

const app = new Hono();
const schema = buildSchema(`
  type Query {
    hello: String
  }
`);

const rootResolver = (c: Context) => {
  return {
    hello: () => 'Hello World!',
  };
};

app.use(
  '/graphql',
  graphqlHandler({
    schema,
    rootResolver,
    plugins: [
      useLogger(),
      useEngine({ parse, validate, specifiedRules, execute, subscribe }),
      useSchema(schema),
    ],
  })
);

app.fire();

Credits

Based on the original work by Minghe Huang.

Keywords

hono

FAQs

Package last updated on 23 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts