Rewrite of a fully-featured GraphQL Server with focus on easy setup, performance & great developer experience. The core of Yoga implements WHATWG Fetch API
Rewrite of a fully-featured GraphQL Server with focus on easy setup, performance & great developer experience. The core of Yoga implements WHATWG Fetch API
Fully-featured GraphQL Server with focus on easy setup, performance & great developer experience
npm i @graphql-yoga/node graphqlYou will need to provide schema to Yoga, either by an existing executable schema, or by providing your type definitions and resolver map:
import { createServer } from '@graphql-yoga/node'
const server = createServer({
schema: {
typeDefs: /* GraphQL */ `
type Query {
hello: String
}
`,
resolvers: {
Query: {
hello: () => 'Hello from Yoga!',
},
},
},
})
server.start()envelop plugins.application/json, application/graphql+json, application/x-www-form-urlencoded, application/graphql and multipart/formdata content-typesnow, up, AWS Lambda, Heroku etc.If this is your first time contributing to this project, please do read our Contributor Workflow Guide before you get started off.
Feel free to open issues and pull requests. We're always welcome support from the community.
Help us keep Yoga open and inclusive. Please read and follow our of Conduct as adopted from Contributor Covenant
MIT
Yoga/Envelop Response cache caches even when the result contains non-cacheable type
Support NestJS v12 / @nestjs/graphql v14 peer dependencies in @graphql-yoga/nestjs
Add a `createChild` method to the logger
Add option to nest `useOpenTelemetry` resolver spans by field path
response-cache: purgeResponse leaks empty Sets from entityToResponseIds under eviction pressure
MCP Support
Switch from `prom-client` to `@prometheus-io/client`.
Duplicate transfer-encoding header when using multipart/mixed with uWebSockets.js
Dependency Dashboard
useJWT DPoP support