Skip to content

Latest commit

 

History

History

graphql

@hattip/graphql

GraphQL middleware for Hattip. This is a thin wrapper around GraphQL Yoga.

Usage

Install @hattip/graphql and graphql, then create and use the yoga middleware.

import { yoga, createSchema } from "@hattip/graphql";

// Create and initialize the other parts of your app
// ...

const schema = createSchema<{ requestContext: RequestContext }>({
  // Your GraphQL schema
  // ...
});

app.use("/graphql", yoga({ schema }));

LICENSE

  • This package comes bundled with graphql-yoga which is part of the GraphQL Yoga project by Graphcool, Prisma, and The Guild, under the MIT License. They are not affiliated with Hattip.
  • Hattip specific code is also licensed under the MIT License.