MyGit
🚩收到GitHub仓库的更新通知

dotansimha/graphql-yoga

Fork: 553 Star: 8017 (更新于 2024-04-25 22:27:46)

license: MIT

Language: TypeScript .

🧘 Rewrite of a fully-featured GraphQL Server with focus on easy setup, performance & great developer experience. The core of Yoga implements WHATWG Fetch API and can run/deploy on any JS environment.

最后发布版本: release-1711751967019 ( 2024-03-30 06:39:27)

官方网址 GitHub网址

✨免费申请网站SSL证书,支持多域名和泛域名,点击查看

GraphQL Yoga

Fully-featured GraphQL Server with focus on easy setup, performance & great developer experience
Go to documenation

npm bundlephobia minified size bundlephobia minified+zipped size bundlephobia treeshaking license

Quick start

Install

pnpm add graphql-yoga graphql

Start

Make a schema, create Yoga and start a Node server:

import { createServer } from 'node:http'
import { createSchema, createYoga } from 'graphql-yoga'

const yoga = createYoga({
  schema: createSchema({
    typeDefs: /* GraphQL */ `
      type Query {
        hello: String
      }
    `,
    resolvers: {
      Query: {
        hello: () => 'Hello from Yoga!'
      }
    }
  })
})

const server = createServer(yoga)

server.listen(4000, () => {
  console.info('Server is running on http://localhost:4000/graphql')
})

Overview

  • Easiest way to run a GraphQL server: Sensible defaults & includes everything you need with minimal setup (we also export a platform/env-agnostic handler so you can build your own wrappers easily).
  • Includes Subscriptions: Built-in support for GraphQL subscriptions using Server-Sent Events.
  • Compatible: Works with all GraphQL clients (Apollo, Relay, Urql...) and fits seamless in your GraphQL workflow.
  • WHATWG Fetch API: the core package depends on WHATWG Fetch API so it can run and deploy on any environment (Serverless, Workers, Deno, Node).
  • Easily Extendable: New GraphQL-Yoga support all envelop plugins.

Features

Documentation

Our documentation website will help you get started.

Examples

We've made sure developers can quickly start with GraphQL Yoga by providing a comprehensive set of examples. See all of them in the examples/ folder.

Comparison

Read more about how GraphQL Yoga compares to other servers in the ecosystem here.

Contributing

If this is your first time contributing to this project, please do read our Contributor Workflow Guide before you get started off.

For this project in particular, to get started on stage/2-failing-test:

  1. Install Node.js
  2. Run in your terminal: npm i -g pnpm@8 && pnpm install && pnpm build
  3. Add tests to packages/graphql-yoga/__tests__ using Jest APIs
  4. Run the tests with pnpm test

Feel free to open issues and pull requests. We're always welcome support from the community.

Code of Conduct

Help us keep Yoga open and inclusive. Please read and follow our Code of Conduct as adopted from Contributor Covenant.

License

MIT

最近版本更新:(数据更新于 2024-04-27 23:26:18)

2024-03-30 06:39:27 release-1711751967019

2024-03-13 22:22:21 release-1710339740692

2024-02-04 20:20:34 release-1707049234397

2024-01-18 23:09:21 release-1705590560943

2024-01-16 22:23:40 release-1705415020500

2024-01-03 23:39:27 release-1704296367444

2023-12-22 23:42:40 release-1703259759953

2023-12-22 19:41:35 release-1703245294977

2023-12-20 04:05:19 release-1703016319040

2023-12-08 17:55:48 release-1702029348423

主题(topics):

bun, deno, fetch, graphql, graphql-server, javascript, nodejs, the-guild, typescript, w3c, whatwg

dotansimha/graphql-yoga同语言 TypeScript最近更新仓库

2024-05-08 22:23:15 labring/FastGPT

2024-05-08 14:25:25 clash-verge-rev/clash-verge-rev

2024-05-08 11:28:05 lobehub/lobe-chat

2024-05-08 10:17:13 chakra-ui/panda

2024-05-08 01:25:30 vuetifyjs/vuetify

2024-05-07 18:29:51 renovatebot/renovate