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

https://github.com/nightblure/grpc-graphql

Simple examples with gRPC and GraphQL
https://github.com/nightblure/grpc-graphql

graphql grpc python

Last synced: 3 months ago
JSON representation

Simple examples with gRPC and GraphQL

Awesome Lists containing this project

README

          

## gRPC and GraphQL examples

---

### How to run gRPC example
1. Generate server and client protos by command
```bash
make gen-proto
```

2. Run `run_grpc_server.py` and `run_grpc_client.py`

*If import error appear, fix import in file `users_pb2.py`: replace `import users_pb2 as users__pb2` with `from . import users_pb2 as users__pb2`

---

### How to run GraphQL example
1. Run `run_graphql_server.py` and `run_graphql_client.py`

---

### Links
* [RealPython: python-microservices-grpc](https://realpython.com/python-microservices-grpc/)
* [Ariadne](https://ariadnegraphql.org/docs/intro.html)