• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

dotansimha/graphql-yoga:

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

dotansimha/graphql-yoga

开源软件地址(OpenSource Url):

https://github.com/dotansimha/graphql-yoga

开源编程语言(OpenSource Language):

TypeScript 89.5%

开源软件介绍(OpenSource Introduction):

GraphQL Yoga

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

Read the 2.0 announcement blog post Read the docs

Installation

npm i @graphql-yoga/node graphql

Basic Usage

This is a very simple example of how to use it:

const { createServer } = require('@graphql-yoga/node')

// Provide your schema
const server = createServer({
  schema: {
    typeDefs: `
      type Query {
        ping: String
      }
    `,
    resolvers: {
      Query: {
        ping: () => 'pong',
      },
    },
  },
})

// Start the server and explore http://localhost:4000/graphql
server.start()

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

  • GraphQL over HTTP spec compliant
  • TypeScript
  • File upload with GraphQL Multipart Request spec
  • Realtime capabilities
  • Accepts application/json, application/graphql+json, application/x-www-form-urlencoded, application/graphql and multipart/formdata content-types
  • Supports ESM
  • Runs everywhere: Can be deployed via now, up, AWS Lambda, Heroku etc.

Contributing

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.

Code of Conduct

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

License

GitHub license

MIT




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
IvanGoncharov/graphql-voyager: 发布时间:2022-06-12
下一篇:
neo4j/graphql: A GraphQL to Cypher query execution layer for Neo4j and JavaScrip ...发布时间:2022-06-12
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap