Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aicfr/graphql-neo4j-openbeerdb
GraphQL server implementation for https://github.com/aicfr/neo4j-openbeerdb and https://github.com/Gerth01/graphql-android-openbeer (Android)
https://github.com/aicfr/graphql-neo4j-openbeerdb
appolo graphql neo4j nodejs openbeerdb popoto
Last synced: about 13 hours ago
JSON representation
GraphQL server implementation for https://github.com/aicfr/neo4j-openbeerdb and https://github.com/Gerth01/graphql-android-openbeer (Android)
- Host: GitHub
- URL: https://github.com/aicfr/graphql-neo4j-openbeerdb
- Owner: aicfr
- Created: 2018-03-02T15:30:43.000Z (almost 7 years ago)
- Default Branch: develop
- Last Pushed: 2018-05-28T15:29:37.000Z (over 6 years ago)
- Last Synced: 2025-02-05T21:41:50.764Z (9 days ago)
- Topics: appolo, graphql, neo4j, nodejs, openbeerdb, popoto
- Language: JavaScript
- Homepage:
- Size: 1.88 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Known Vulnerabilities](https://snyk.io/test/github/aicfr/graphql-neo4j-openbeerdb/badge.svg?targetFile=package.json)](https://snyk.io/test/github/aicfr/graphql-neo4j-openbeerdb?targetFile=package.json)
# graphql-neo4j-openbeerdb
![graph](graph.png "GraphQL schema")
## Install
```
npm install
```## Configuration
### .env sample```
PORT=NEO4J_HTTP_HOST=
NEO4J_URI=bolt://
NEO4J_USER=
NEO4J_PASSWORD=HTTP_PROXY_AGENT_URL=http://
```## Run
```
npm start
```## GraphQL GUI
## GraphQL voyager
## Neo4j browser
## Documentation
### Queries
#### Find beer```json
{
findBeer(filter: {name: "coro"}, first: 5) {
beerName
abv
description
picture
rating {
avg
rating
}
brewery {
breweryName
address1
city
state
zipCode
country
phoneNumber
website
description
geocode {
latitude
longitude
}
}
category {
categoryName
}
style {
styleName
}
}
}
```#### Find beerer by id
```json
{
findBeerer(filter: {id: 1}, first: 5) {
beererName
rated(first: 5) {
beer {
beerName
}
rate {
rating
}
}
checked(first: 5) {
beer {
beerName
}
check {
location
}
}
friends(first: 5) {
friend {
beererName
}
friendship {
since
}
}
}
}
```#### Add rate
```json
mutation {
rate(input: {me: 1, beerID: 11, rating: 1, comment: ""})
}
```#### Add check
```json
mutation {
check(input: {me: 1, beerID: 11, location: "Vineuil, FR", price: 4.5})
}
```#### Add friend
```json
mutation {
addFriend(input: {me: 1, friendID: 3})
}
```### apollo-codegen
```
apollo-codegen introspect-schema schema/schema.graphql
```### Generate graph
```
graphqlviz schema/schema.graphql -g | dot -Tpng -o graph.png
```### Generate documentation
```
graphdoc -f -s schema.json -o public/docs
```