Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manonworld/graphql-poc
Just a Proof of Concept for GraphQL
https://github.com/manonworld/graphql-poc
graphql mysql overblog-graphql symfony
Last synced: about 12 hours ago
JSON representation
Just a Proof of Concept for GraphQL
- Host: GitHub
- URL: https://github.com/manonworld/graphql-poc
- Owner: manonworld
- Created: 2021-08-19T07:22:12.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-02T22:28:02.000Z (about 3 years ago)
- Last Synced: 2023-11-10T18:44:33.696Z (about 1 year ago)
- Topics: graphql, mysql, overblog-graphql, symfony
- Language: PHP
- Homepage: https://manonworld.de
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
Awesome Lists containing this project
README
# GraphQL POC
Just a GraphQL proof of concept
Categories with associated products example
## Installation
Just run: ``` make install ```
## Running the application
Just run: ``` make run ```
And then point your browser to ``` http://localhost:8000/?query={categories(id:1){name,description,products(first:2,after:%22YXJyYXljb25uZWN0aW9uOjI=%22){edges{cursor,node{name,description,price}}}}} ```
OR inside ``` localhost:8000/graphiql ```
```
query{
categories(id:1){
name,
description,
products(first:2,after:"YXJyYXljb25uZWN0aW9uOjI="){
edges{
cursor,
node{
name,
description,
price
}
}
}
}
}
```And to create a product for the category id 1, just run the following mutation inside ``` localhost:8000/graphiql ```
```
mutation {
createProducts(input: {
name: "TestFromMutationName2",
description: "TestFromMutationDescription2",
price: 2.4,
category: 1
}) {
id,
name,
price
}
}
```## Cleaning the application
Just run: ``` make clean ```