Skip to content

lowsky/spotify-graphql-server

Repository files navigation

spotify-graphql-server

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.

Get started

prerequisites

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 ( >=14 ) installed.

Run yarn install.

run server

yarn start to start the graphql server, then open http:https://localhost:4000/

yarn watch to start the graphql server which automatically restarts when any sources were changed (driven by nodemon)

run tests

yarn test

print GraphQL schema idl

yarn run printSchema