Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/programarivm/graphql-demo-symfony4
This is a Hello World app that shows how to use GraphQLBundle in Symfony 4 projects.
https://github.com/programarivm/graphql-demo-symfony4
4 bundle demo graphql hello symfony world
Last synced: 16 days ago
JSON representation
This is a Hello World app that shows how to use GraphQLBundle in Symfony 4 projects.
- Host: GitHub
- URL: https://github.com/programarivm/graphql-demo-symfony4
- Owner: programarivm
- Created: 2018-07-07T09:57:40.000Z (over 6 years ago)
- Default Branch: develop
- Last Pushed: 2018-07-15T10:34:49.000Z (over 6 years ago)
- Last Synced: 2024-11-11T00:39:05.272Z (2 months ago)
- Topics: 4, bundle, demo, graphql, hello, symfony, world
- Language: PHP
- Homepage:
- Size: 52.7 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## GraphQL Demo for Symfony 4
This is a simple demo that shows how to use [GraphQLBundle](https://github.com/Youshido/GraphQLBundle) in Symfony 4 projects, and is an equivalent of [Youshido/GraphQLDemoApp](https://github.com/Youshido/GraphQLDemoApp/blob/master/README.md) -- a GraphQL demo for Symfony 3.
This Hello World app is been set up with the comments made in this discussion: [Symfony 4 support](https://github.com/Youshido/GraphQLBundle/issues/68).
### How to Run
Install dependencies:
composer install
Run the web server:
php -S 127.0.0.1:8085 -t public
### Examples
Request:
$ curl -XPOST 'http://localhost:8085/graphql'
Response:
{
"errors": [
{
"message": "Must provide an operation."
}
]
}Request:
$ curl -XPOST 'http://localhost:8085/graphql' -F 'query={ greeting }'
Response:
{
"data": {
"greeting": "Hello world!"
}
}## Contributions
Contributions are welcome.
- Feel free to send a pull request
- Drop an email at [email protected] with the subject "GraphQL Demo for Symfony 4"
- Leave me a comment on [Twitter](https://twitter.com/programarivm)
- Say hello on [Google+](https://plus.google.com/+Programarivm)Many thanks.