Giter Club home page Giter Club logo

musikell's Introduction

musikell

Example of a GraphQL application backed by Neo4j using morpheus and hasbolt, respectively.

Run it locally

Dependencies

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
Using Cabal
cabal new-run musikell
Using Nix

Does not require to have cabal installed.

nix-shell --pure shell.nix
cabal new-run musikell

GraphQL API via Http

Go to http://localhost:3000/api and start sending queries. Eg. using Insomnia:

insomnia

You can also get the GraphQL Schema at http://localhost:3000/schema.gql.

Queries

Get Artist
query GetArtist {
  artist (name: "Tool") {
    name
    spotifyId
  }
}
Get Albums by Artist
query GetAlbumsByArtist {
  albumsByArtist (name: "Opeth") {
    name
    yearOfReleased
    totalLength
  }
}

Mutations

Create Artist
mutation CreateArtist {
  newArtist(names: ["Porcupine Tree", "Puscifer"]) {
    name
    spotifyId
  }
}
Create Artist Albums
mutation CreateArtistAlbums {
  newArtistAlbums(spotifyId: "0ybFZ2Ab08V8hueghSXm6E") {
    name
    yearOfRelease
    totalLength
  }
}

musikell's People

Contributors

gvolpe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.