All Projects → danielvladco → Go Proto Gql

danielvladco / Go Proto Gql

Licence: apache-2.0
Protobuff plugins for generating graphql schema and golang to graphql bindings. Also supports a graphql gateway (Alpha)

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Go Proto Gql

Hotchocolate
Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
Stars: ✭ 3,009 (+2269.29%)
Mutual labels:  graphql, graphql-server, graphql-schema
36 Graphql Concepts
📜 36 concepts every GraphQL developer should know.
Stars: ✭ 209 (+64.57%)
Mutual labels:  graphql, graphql-server, graphql-schema
Graphql2rest
GraphQL to REST converter: automatically generate a RESTful API from your existing GraphQL API
Stars: ✭ 181 (+42.52%)
Mutual labels:  graphql, graphql-server, graphql-schema
Apollo Server
🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.
Stars: ✭ 12,145 (+9462.99%)
Mutual labels:  graphql, graphql-server, graphql-schema
Graphql Cost Analysis
A Graphql query cost analyzer.
Stars: ✭ 527 (+314.96%)
Mutual labels:  graphql, graphql-server, graphql-schema
Graphql Log
Add logging to your GraphQL resolvers so you know what's going on in your app.
Stars: ✭ 94 (-25.98%)
Mutual labels:  graphql, graphql-server, graphql-schema
Gramps Legacy
The core data source combination engine of GrAMPS.
Stars: ✭ 198 (+55.91%)
Mutual labels:  graphql, graphql-server, graphql-schema
Mu Haskell
Mu (μ) is a purely functional framework for building micro services.
Stars: ✭ 215 (+69.29%)
Mutual labels:  graphql, grpc, protocol-buffers
Typegql
Create GraphQL schema with TypeScript classes.
Stars: ✭ 415 (+226.77%)
Mutual labels:  graphql, graphql-server, graphql-schema
Rejoiner
Generates a unified GraphQL schema from gRPC microservices and other Protobuf sources
Stars: ✭ 3,432 (+2602.36%)
Mutual labels:  graphql, grpc, graphql-server
Fullstack Graphql
🌈 Simple Fullstack GraphQL Application. API built with Express + GraphQL + Sequelize (supports MySQL, Postgres, Sqlite and MSSQL). WebApp built with React + Redux to access the API. Written in ES6 using Babel + Webpack.
Stars: ✭ 955 (+651.97%)
Mutual labels:  graphql, graphql-server, graphql-schema
Strawberry
A new GraphQL library for Python 🍓
Stars: ✭ 891 (+601.57%)
Mutual labels:  graphql, graphql-server, graphql-schema
Graphql Transform Schema
Transform, filter & alias resolvers of a GraphQL schema
Stars: ✭ 84 (-33.86%)
Mutual labels:  graphql, graphql-server, graphql-schema
Graphql Portal
Configurable and distributed GraphQL Gateway. Convert your legacy data sources or monitor your existing GraphQL Services with a visual dashboard.
Stars: ✭ 88 (-30.71%)
Mutual labels:  graphql, gateway
Qlkube
A GraphQL api for Kubernetes
Stars: ✭ 89 (-29.92%)
Mutual labels:  graphql, graphql-server
Crm
A lightweight CRM application builds with microservices architecture
Stars: ✭ 102 (-19.69%)
Mutual labels:  graphql, grpc
Ariadne
Ariadne is a Python library for implementing GraphQL servers using schema-first approach.
Stars: ✭ 1,274 (+903.15%)
Mutual labels:  graphql, graphql-server
Json Graphql Server
Get a full fake GraphQL API with zero coding in less than 30 seconds.
Stars: ✭ 1,369 (+977.95%)
Mutual labels:  graphql, graphql-server
Protoc Gen Struct Transformer
Transformation functions generator for Protocol Buffers.
Stars: ✭ 105 (-17.32%)
Mutual labels:  grpc, protocol-buffers
Protodot
transforming your .proto files into .dot files (and .svg, .png if you happen to have graphviz installed)
Stars: ✭ 107 (-15.75%)
Mutual labels:  grpc, protocol-buffers

Protoc plugins for generating graphql schema and go graphql code

If you use micro-service architecture with grpc for back-end and graphql api gateway for front-end, you will find yourself repeating a lot of code for translating from one transport layer to another (which many times may be a source of bugs)

This repository aims to simplify working with grpc trough protocol buffers and graphql by generating code.

Install:

go install github.com/danielvladco/go-proto-gql/protoc-gen-gql
go install github.com/danielvladco/go-proto-gql/protoc-gen-gogql

Usage Examples:

The protoc compiler expects to find plugins named proto-gen-<PLUGIN_NAME> on the execution $PATH. So first:

export PATH=${PATH}:${GOPATH}/bin

--gql_out plugin will generate graphql files with extension .graphqls rather than go code which means it can be further used for any other language or framework.

Example:

protoc --gql_out=paths=source_relative:. -I=. -I=./example/ ./example/*.proto

If you still want to generate go source code instead of graphql then use http://github.com/99designs/gqlgen plugin, and map all the generated go types with all the generated graphql types. Luckily --gqlgencfg_out plugin does exactly this.


--gogql_out plugin generates methods for implementing github.com/99designs/gqlgen/graphql.Marshaler and github.com/99designs/gqlgen/graphql.Unmarshaler interfaces. Now proto enums, oneofs and maps will work fine with graphql.

This plugin also creates convenience methods that will implement generated by the gqlgen MutationResolver and QueryResolver interfaces.

Example:

protoc --gogql_out=gogoimport=false,paths=source_relative:. -I=. -I=./example/ ./example/*.proto

See /example folder for more examples.

Gateway (alpha)

A unified gateway is also possible. Right now a gateway can be spawn up pointing to a list of grpc endpoints (grpc reflection must be enabled on the grpc servers). The gateway will query the servers for protobuf descriptors and generate a graphql schema abstract tree. The requests to the gateway will be transformed on the fly to grpc servers without any additional code generation or writing any code at all. See examples/gateway for usage more info.

Community:

Will be very glad for any contributions so feel free to create issues, forks and PRs.

License:

go-proto-gql is released under the Apache 2.0 license. See the LICENSE file for details.

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].