Coder Social home page Coder Social logo

blevine / giraphql Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hayes/pothos

0.0 0.0 0.0 13.41 MB

GiraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach

Home Page: https://giraphql.com

License: ISC License

TypeScript 100.00% JavaScript 0.01%

giraphql's Introduction

GiraphQL - A plugin based GraphQL schema builder for typescript

GiraphQL makes writing graphql schemas in typescript easy, fast and enjoyable. The core of GiraphQL adds 0 overhead at runtime, and has graphql as its only dependency.

By leaning heavily on typescripts ability to infer types, GiraphQL is the most type-safe way of writing GraphQL schemas in typescript/node while requiring very few manual type definitions and no code generation.

GiraphQL has a unique and powerful plugin system that makes every plugin feel like its features are built into the core library. Plugins can extend almost any part of the API by adding new options or methods that can take full advantage of GiraphQLs type system.

Hello, World

import { ApolloServer } from 'apollo-server';
import SchemaBuilder from '@giraphql/core';

const builder = new SchemaBuilder({});

builder.queryType({
  fields: (t) => ({
    hello: t.string({
      args: {
        name: t.arg.string(),
      },
      resolve: (parent, { name }) => `hello, ${name || 'World'}`,
    }),
  }),
});

new ApolloServer({
  schema: builder.toSchema({}),
}).listen(3000);

Full docs available at https://giraphql.com

Plugins that make GiraphQL even better

  • Add global, type level, or field level authorization checks to your schema
  • Validating your inputs and arguments
  • Quickly define data-loaders for your types and fields to avoid n+1 queries.
  • Easy to use builder methods for defining relay style nodes and connections, and helpful utilities for cursor based pagination.
  • Define simple object types without resolvers or manual type definitions.
  • Add mock resolver for easier testing
  • Build multiple subsets of your graph to easily share code between internal and external APIs.
  • Integrate with existing schema graphql directives in a type-safe way.
  • Make any part of your graph subscribable to get live updates as your data changes.
  • A plugin for easily including error types in your GraphQL schema and hooking up error types to resolvers.
  • A plugin for more efficient integration with prisma that can help solve n+1 issues and more efficienty resolve queries

giraphql's People

Contributors

hayes avatar github-actions[bot] avatar delaneyj avatar benbender avatar jomik avatar bengthagemeister avatar kesne avatar martinpelcat avatar awhipple avatar baristikir avatar n1ru4l avatar richardkall avatar sushantdhiman avatar nichtj3 avatar dependabot[bot] 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.