GraphQL middleware for Hattip. This is a thin wrapper around GraphQL Yoga.
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 }));
- 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.