React and Flux based data-driven application built with GraphQL
npm install pm2 -g
git clone [email protected]:aviralmishra/react-flux-graphql-demo.git
npm install
npm run dev
npm run webpack
npm run test
npm run verify-tests
npm run build-webpack
npm run build-node
npm run start-prod
- Atom Editor Cheat Sheet
- Bootstrap
- JavaScript Style Guide
- Webpack
- MongoDB Driver API
- Bootstrap SASS
- Bootstrap Components
- SASS
- Form validations
- Automated tests
- Production build and run
Once the application is running, visit https://localhost:8080/graphql to execute GraphQL queries. Listed below are some things you can run.
Note: These will require that the MongoDB collections are setup and accessible.
query {
albums {
title,
released
},
artists {
name
wikipedia
}
}
query {
album(id: "album-1001") {
id
title
released
art
artistId
description
}
}
mutation CreateAlbum($input: AlbumInput!) {
createAlbum(input: $input) {
id
title
released
art
artistId
description
}
}
{
"input": {
"id": "album-1005",
"title": "Continuum",
"released": "2006-09-12",
"art": "https://en.wikipedia.org/wiki/Continuum_(John_Mayer_album)#/media/File:Continuum_(album).png",
"artistId": "artist-1002",
"description": "Continuum is the third studio album by American musician John Mayer. The album debuted at number 2 on the US Billboard 200 chart, selling 300,186 copies in its first week."
}
}
mutation {
createAlbum(input: {
id: "album-1006",
title: "Continuum",
released: "2006-09-12",
art: "https://en.wikipedia.org/wiki/Continuum_(John_Mayer_album)#/media/File:Continuum_(album).png",
artistId: "artist-1002",
description: "Continuum is the third studio album by American musician John Mayer. The album debuted at number 2 on the US Billboard 200 chart, selling 300,186 copies in its first week."
}) {
id
title
released
art
artistId
description
}
}
mutation {
createArtist(input: {id: "artist-1006", name: "Cliff Richard"}) {
id
name
description
}
}