Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xanthous-tech/grpc-graphql-schema

Convert gRPC proto definition into GraphQL Schema
https://github.com/xanthous-tech/grpc-graphql-schema

graphql graphql-schema grpc typescript

Last synced: about 1 month ago
JSON representation

Convert gRPC proto definition into GraphQL Schema

Awesome Lists containing this project

README

        

# Grpc Graphql Schema



Convert gRPC proto Definition into GraphQL Schema

[Slides @ GraphQL BKK 4.0](https://docs.google.com/presentation/d/11sw3yK7p6xYcES9Wsjco7z3lGgmYlefnNrqhZ6vaYvA/edit?usp=sharing)

[Medium Article](https://medium.com/xanthous/translating-grpc-services-into-graphql-6a8e49556d96)

# How to Use

```javascript
const { getGraphqlSchemaFromGrpc } = require('grpc-graphql-schema');

getGraphqlSchemaFromGrpc({
endpoint: 'localhost:50051',
protoFilePath: '/path/to/ServiceDefinition.proto',
serviceName: 'GrpcServiceName',
packageName: 'name.package',
}).then(schema => {
// load schema in graphql server
});
```