https://github.com/realflowcontrol/php-graphql-microservice
Simple example implementation of a GraphQL API on top of a microservice architecture
https://github.com/realflowcontrol/php-graphql-microservice
graphql php reachtphp
Last synced: 9 months ago
JSON representation
Simple example implementation of a GraphQL API on top of a microservice architecture
- Host: GitHub
- URL: https://github.com/realflowcontrol/php-graphql-microservice
- Owner: realFlowControl
- License: mit
- Created: 2019-04-15T11:31:36.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-01-07T19:53:26.000Z (about 4 years ago)
- Last Synced: 2025-05-06T06:18:37.935Z (9 months ago)
- Topics: graphql, php, reachtphp
- Language: PHP
- Homepage:
- Size: 19.5 KB
- Stars: 17
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GraphQL API on top of Microservices
This is just a port from Node.js/Express to PHP/ReactPHP for Chris Norings article on building a [Serverless GraphQL API on top of a Microservice architecture](https://dev.to/azure/learn-how-you-can-build-a-serverless-graphql-api-on-top-of-a-microservice-architecture-233g).
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
### Prerequisites
You need to have `docker` and `docker-compose` up and running on your local machine.
### Installing
```bash
git clone https://github.com/flow-control/php-graphql-microservice.git
cd php-graphql-microservice
make
docker-compose up -d
curl -X POST \
-H "Content-Type: application/json" \
--data '{ "query": "{ product (id:1) { id name } }" }' \
localhost:8000
```
## Build with
- [ReactPHP](https://reactphp.org/)
- [graphql-php](https://github.com/webonyx/graphql-php)
- [clue/buzz-react](https://github.com/clue/reactphp-buzz)
## License
MIT, see [LICENSE file](LICENSE).