All Projects → prisma-labs → Graphqlgen

prisma-labs / Graphqlgen

Licence: mit
⚙️ Generate type-safe resolvers based upon your GraphQL Schema

Programming Languages

typescript
32286 projects
flow
126 projects

Projects that are alternatives of or similar to Graphqlgen

Graphql Typed Client
A tool that generates a strongly typed client library for any GraphQL endpoint. The client allows writing GraphQL queries as plain JS objects (with type safety, awesome code completion experience, custom scalar type mapping, type guards and more)
Stars: ✭ 194 (-75.63%)
Mutual labels:  graphql, code-generation, codegen
Graphql Engine
Blazing fast, instant realtime GraphQL APIs on your DB with fine grained access control, also trigger webhooks on database events.
Stars: ✭ 24,845 (+3021.23%)
Mutual labels:  graphql, graphql-server
Create Graphql
Command-line utility to build production-ready servers with GraphQL.
Stars: ✭ 441 (-44.6%)
Mutual labels:  graphql, graphql-server
Pup
The Ultimate Boilerplate for Products.
Stars: ✭ 563 (-29.27%)
Mutual labels:  graphql, graphql-server
Typegql
Create GraphQL schema with TypeScript classes.
Stars: ✭ 415 (-47.86%)
Mutual labels:  graphql, graphql-server
Graphql Up
Get a ready-to-use GraphQL API for your schema
Stars: ✭ 415 (-47.86%)
Mutual labels:  graphql, graphql-server
Weaver
Dependency Injection framework for Swift (iOS/macOS/Linux)
Stars: ✭ 546 (-31.41%)
Mutual labels:  code-generation, codegen
Spikenail
A GraphQL Framework for Node.js
Stars: ✭ 358 (-55.03%)
Mutual labels:  graphql, graphql-server
Eliasdb
EliasDB a graph-based database.
Stars: ✭ 611 (-23.24%)
Mutual labels:  graphql, graphql-server
Gqlgen
go generate based graphql server library
Stars: ✭ 6,880 (+764.32%)
Mutual labels:  graphql, codegen
Node Graphql Server
Boilerplate code for scalable, production-ready GraphQL servers
Stars: ✭ 761 (-4.4%)
Mutual labels:  graphql, graphql-server
Framework
.NET Core Extensions and Helper NuGet packages.
Stars: ✭ 399 (-49.87%)
Mutual labels:  graphql, graphql-server
Nest Ideas Api
REST API for app ideas built in nestjs
Stars: ✭ 380 (-52.26%)
Mutual labels:  graphql, graphql-server
Neo4j Graphql
GraphQL bindings for Neo4j, generates and runs Cypher
Stars: ✭ 429 (-46.11%)
Mutual labels:  graphql, graphql-server
Parse Server
API server module for Node/Express
Stars: ✭ 19,165 (+2307.66%)
Mutual labels:  graphql, graphql-server
Graphql Cost Analysis
A Graphql query cost analyzer.
Stars: ✭ 527 (-33.79%)
Mutual labels:  graphql, graphql-server
Graphql Prisma Typescript
🏡 GraphQL server reference implementation (Airbnb clone) in Typescript using Prisma & graphql-yoga
Stars: ✭ 723 (-9.17%)
Mutual labels:  graphql, graphql-server
Wp Graphql Woocommerce
Add WooCommerce support and functionality to your WPGraphQL server
Stars: ✭ 318 (-60.05%)
Mutual labels:  graphql, graphql-server
Graphaello
A Tool for Writing Declarative, Type-Safe and Data-Driven Applications in SwiftUI using GraphQL
Stars: ✭ 355 (-55.4%)
Mutual labels:  graphql, codegen
Caliban
Functional GraphQL library for Scala
Stars: ✭ 581 (-27.01%)
Mutual labels:  graphql, graphql-server

graphqlgen

CircleCI npm version

Generate & scaffold type-safe resolvers based on your GraphQL Schema in TypeScript, Flow & Reason

Deprecation note

graphqlgen has been officially deprecated in favor of the The Guild's project GraphQL Code Generator. Learn more about the collaboration of Prisma and the Guild in this blog post.


About

Highlights

  • Schema-first Design in SDL to derive ideal types
  • Type-safety Resolvers with precise signatures including parent, args and return type
  • DX Precise resolver types puts your editor intellisense to work
  • Ecosystem Interop codegen suitable for Yoga 1 or Apollo Server and supports prettier and graphql-import out of the box

Motivation

Programming in type-safe environments can contribute toward great confidence in your code's integrity. graphqlgen aims to leverage the GraphQL type system to make your resolvers completely type-safe. This is important because resolvers are the heart of any graphql service and yet the hardest to statically type due to their dynaminism.

Supported languages

  • TypeScript
  • Flow

Others under discussion:

Getting started

Try out a project initializer

  1. Run initializer

    yarn create graphqlgen my-app # npm init graphqlgen my-app
    cd my-app
    yarn start # npm run start
    
  2. Edit ./my-app/src/schema.graphql to your heart's content.

  3. Generate types:

    yarn graphqlgen
    

Add to existing project

yarn add --dev graphqlgen # npm install --save-dev graphqlgen

Then you will have access to the cli (gg or graphqlgen):

yarn -s gg --help # npm run gg --help
Usage: graphqlgen or gg

Options:
  -i, --init     Initialize a graphqlgen.yml file
  -v, --version  Show version number                                   [boolean]
  -h, --help     Show help                                             [boolean]

gg depends on the presence of a graphqlgen.yml config located in the directory where gg is invoked. Here is an example:

language: typescript
schema: ./src/schema.graphql
context: ./src/context.ts:Context
output: ./src/generated/graphqlgen.ts
models:
  files:
    - ./src/generated/prisma-client/index.ts

Documentation

https://oss.prisma.io/graphqlgen

Addendum

Community

Join us at #graphqlgen in our Slack group and if you have more fleshed out ideas, bug reports etc. create a Github issue:

Project Status

graphqlgen is still in early stage development where breaking changes and tool design are a fluid matter. Feedback is deeply appreciated. You may feel comfortable giving it a try on production systems since there is no runtime aspect and hence quite safe to do so (save for a few optional default resolvers).

Prior Art

  • gqlgen is the Golang equivalent of graphqlgen and served as a source of inspiration
  • graphql-code-generator is a similar tool based on templates support both frontend & backend

Prisma

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].