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
- Host: GitHub
- URL: https://github.com/nightblure/grpc-graphql
- Owner: nightblure
- Created: 2024-03-27T20:51:29.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-16T17:15:34.000Z (about 2 years ago)
- Last Synced: 2024-04-16T22:34:59.810Z (about 2 years ago)
- Topics: graphql, grpc, python
- Language: Python
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)