Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/duyvu997/apolo-grpc-ts
https://github.com/duyvu997/apolo-grpc-ts
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/duyvu997/apolo-grpc-ts
- Owner: duyvu997
- Created: 2023-04-13T04:50:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-13T04:51:20.000Z (over 1 year ago)
- Last Synced: 2023-08-05T15:39:05.847Z (over 1 year ago)
- Language: TypeScript
- Size: 465 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gRPC / graphQL sample project
this PoC will allow us to create blog posts, and is composed with:
- a **graphQL server**, in front of the client as our unique BFF entry point. Its role is mainly to validate input data (required / optional fields, type, …) and filter output data. The validation here is important since required & optional fields have been dropped from proto3. It also acts as a client to the gRPC micro-service.
- a **gRPC server**, to perform all functional operations. Here to create and list some blog posts.To run the PoC, install NodeJs, Mongodb and Git, and launch the following commands:
```
cd post-api && npm start
cd graphql-api && npm start
🚀 Server ready at http://localhost:4000/graphql
```and run the following query:
````
mutation {
addPost(data: { title: "helloooo" }) {
message
result { _id title body }
}
}
```
````