This demonstrates how to build a GraphQL server which fetches data from an external API (Spotify), see german blog post or english blog post
Use the Live Demo as a playground for graphql queries.
For running this example locally, you must register your own application at spotify. Then create an .env file with the generated token, based on the example .env.example file.
Have a modern node.js
version ( >=8 ) installed.
Run npm install
.
npm start
to start the graphql server, then open http://localhost:4000/
npm run watch
to start the graphql server which automatically restarts when any sources were changed (driven by nodemon
)
npm test
npm run printSchema