:guitar: Artists, Albums and Songs represented using Neo4j + GraphQL
Haskell
56
54 commits
updated Apr 12, 2020
Example of a GraphQL application backed by Neo4j using morpheus and hasbolt, respectively.
We need a Neo4j instance running. Get it up and running quickly using docker.
docker run -it --rm -p7474:7474 -p7687:7687 --env NEO4J_AUTH=neo4j/test neo4j:latest
cabal new-run musikell
Does not require to have cabal installed.
nix-shell --pure shell.nix
cabal new-run musikell
Go to http://localhost:3000/api and start sending queries. Eg. using Insomnia:

You can also get the GraphQL Schema at http://localhost:3000/schema.gql.
query GetArtist {
artist (name: "Tool") {
name
spotifyId
}
}
query GetAlbumsByArtist {
albumsByArtist (name: "Opeth") {
name
yearOfReleased
totalLength
}
}
mutation CreateArtist {
newArtist(names: ["Porcupine Tree", "Puscifer"]) {
name
spotifyId
}
}
mutation CreateArtistAlbums {
newArtistAlbums(spotifyId: "0ybFZ2Ab08V8hueghSXm6E") {
name
yearOfRelease
totalLength
}
}
54 commits
Haskell
95.2%
Nix
2.9%
Dhall
2.0%
:guitar: Artists, Albums and Songs represented using Neo4j + GraphQL
Haskell
56
54 commits
updated Apr 12, 2020
Example of a GraphQL application backed by Neo4j using morpheus and hasbolt, respectively.
We need a Neo4j instance running. Get it up and running quickly using docker.
docker run -it --rm -p7474:7474 -p7687:7687 --env NEO4J_AUTH=neo4j/test neo4j:latest
cabal new-run musikell
Does not require to have cabal installed.
nix-shell --pure shell.nix
cabal new-run musikell
Go to http://localhost:3000/api and start sending queries. Eg. using Insomnia:

You can also get the GraphQL Schema at http://localhost:3000/schema.gql.
query GetArtist {
artist (name: "Tool") {
name
spotifyId
}
}
query GetAlbumsByArtist {
albumsByArtist (name: "Opeth") {
name
yearOfReleased
totalLength
}
}
mutation CreateArtist {
newArtist(names: ["Porcupine Tree", "Puscifer"]) {
name
spotifyId
}
}
mutation CreateArtistAlbums {
newArtistAlbums(spotifyId: "0ybFZ2Ab08V8hueghSXm6E") {
name
yearOfRelease
totalLength
}
}
54 commits
Haskell
95.2%
Nix
2.9%
Dhall
2.0%