Spotify API GraphQL Schema and Resolvers Built with GraphQL.js
GraphQL Spotify:Refer to src/schema/RootQuery.js for operations currently supported.
Deployed Example App Powered By GraphQL Spotify And Its Source Code
Getting started
let token;//... somewhere the Spotify token is gotten from the contextconst schema = // pass the schema to your favorite server that accepts GraphQL.js Schemas
Make sure the token obtained has the correct scope, certain queries and mutations require different scopes from Spotify
Getting started with apollo-server-express
npm install --save graphql dataloader graphql-tools isomorphic-fetch body-parser apollo-server-express express graphql-spotify
ES6
;;;// Initialize the appconst port = || 3000const app = ;// bodyParser is needed just for POST.app;// GraphiQL, a visual editor for queriesapp;app
ES5
const makeSchema = makeSchema;const graphqlExpress = graphqlExpress;const express = ;const bodyParser = // Initialize the appconst port = || 3000const app = ;// bodyParser is needed just for POST.app;// GraphiQL, a visual editor for queriesapp;app
Contribute
Anyone is welcome! Take a look at Roadmap.md for PR ideas and file some issues!