Git Product home page Git Product logo

azerothian / graphql-yoga Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dotansimha/graphql-yoga

0.0 2.0 0.0 13.82 MB

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

Home Page: https://www.graphql-yoga.com/

License: MIT License

Shell 0.03% JavaScript 4.44% TypeScript 91.64% CSS 3.20% HTML 0.69%

graphql-yoga's Introduction

GraphQL Yoga

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

Docs

Installation

npm i @graphql-yoga/node graphql

Quickstart

You 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()

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

graphql-yoga's People

Contributors

renovate[bot] avatar schickling avatar ardatan avatar n1ru4l avatar renovate-bot avatar github-actions[bot] avatar saihaj avatar maticzav avatar 0xdaksh avatar nikolasburk avatar timsuchanek avatar kbrandwijk avatar fabien0102 avatar charlypoly avatar jycouet avatar dotansimha avatar notrab avatar lfades avatar giautm avatar kachkaev avatar dimamachina avatar al1l avatar gilgardosh avatar eduardomoroni avatar jakelacey2012 avatar tuvalsimha avatar aladouagi avatar devanb avatar douglaseggleton avatar mjdickinson avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.