{"id":14976127,"url":"https://github.com/goldensunliu/graphql-spotify","last_synced_at":"2025-10-05T22:59:32.507Z","repository":{"id":89322607,"uuid":"118667592","full_name":"goldensunliu/graphql-spotify","owner":"goldensunliu","description":"GraphQL Schema And Resolvers For Spotify Web API","archived":false,"fork":false,"pushed_at":"2019-03-11T14:56:29.000Z","size":60,"stargazers_count":59,"open_issues_count":4,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T11:11:13.580Z","etag":null,"topics":["dataloader","graphql","graphql-js","graphql-schema","graphql-server","graphql-spotify","graphql-tools","resolver","spotify","spotify-api"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goldensunliu.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"Roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-23T20:47:51.000Z","updated_at":"2023-11-23T23:02:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"9ac78f9e-1ad6-4a65-b941-f97e071f3430","html_url":"https://github.com/goldensunliu/graphql-spotify","commit_stats":{"total_commits":27,"total_committers":2,"mean_commits":13.5,"dds":0.03703703703703709,"last_synced_commit":"dd333ce98c1ddc2b3457326329fc3a50cd5d57ee"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/goldensunliu/graphql-spotify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldensunliu%2Fgraphql-spotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldensunliu%2Fgraphql-spotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldensunliu%2Fgraphql-spotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldensunliu%2Fgraphql-spotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goldensunliu","download_url":"https://codeload.github.com/goldensunliu/graphql-spotify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goldensunliu%2Fgraphql-spotify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278532353,"owners_count":26002346,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dataloader","graphql","graphql-js","graphql-schema","graphql-server","graphql-spotify","graphql-tools","resolver","spotify","spotify-api"],"created_at":"2024-09-24T13:53:21.483Z","updated_at":"2025-10-05T22:59:32.464Z","avatar_url":"https://github.com/goldensunliu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## GraphQL Spotify: [Spotify API](https://beta.developer.spotify.com/documentation/web-api/reference/) GraphQL Schema and Resolvers Built with [GraphQL.js](https://github.com/graphql/graphql-js)\n![](https://travis-ci.org/goldensunliu/graphql-spotify.svg?branch=master)\n[![npm version](https://badge.fury.io/js/graphql-spotify.svg)](https://badge.fury.io/js/graphql-spotify)\n\nRefer to [src/schema/RootQuery.js](src/schema/RootQuery.js) for operations currently supported.\n\n---\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n\n- [Blog on Why](#blog-on-why)\n- [Demo](#demo)\n- [Getting started](#getting-started)\n  - [Getting started with apollo-server-express](#getting-started-with-apollo-server-express)\n      - [ES6](#es6)\n      - [ES5](#es5)\n- [Contribute](#contribute)\n- [Used By](#used-by)\n  - [Created By](#created-by)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n## Blog on Why\n\n[Check out the blog](https://medium.com/@sitianliu_57680/why-i-built-a-graphql-server-for-spotify-api-4f516836e4ec) on why graphql-spotify was built.\n## Demo\n\n****[Deployed Example App Powered By GraphQL Spotify](https://graphql-spotify-example-zzajohosbz.now.sh)**** And Its [Source Code Repo](https://github.com/goldensunliu/graphql-spotify-example)\n\n## Getting started\n```javascript\nimport { makeSchema } from \"graphql-spotify\"\nlet token;\n//... somewhere the Spotify token is gotten from the context\nconst schema = makeSchema(token)\n// pass the schema to your favorite server that accepts GraphQL.js Schemas\n```\n**Make sure the token obtained has the [correct scope](https://beta.developer.spotify.com/documentation/general/guides/scopes/), certain queries and mutations require [different scopes](https://beta.developer.spotify.com/documentation/general/guides/scopes/) from Spotify**\n### Getting started with apollo-server-express\n`npm install --save graphql dataloader graphql-tools isomorphic-fetch body-parser apollo-server-express express graphql-spotify`\n\n##### ES6\n```javascript\nimport { makeSchema } from \"graphql-spotify\";\nimport { graphqlExpress, graphiqlExpress } from 'apollo-server-express';\nimport express from 'express';\nimport bodyParser from 'body-parser'\n// Initialize the app\nconst port = parseInt(process.env.PORT, 10) || 3000\nconst app = express();\n// bodyParser is needed just for POST.\napp.use(\n    '/graphql',\n    bodyParser.json(),\n    graphqlExpress(req =\u003e {\n        let token;\n        //... somewhere the spotify token is gotten from the context\n        const schema = makeSchema(token)\n        return { schema }\n    }));\n// GraphiQL, a visual editor for queries\napp.use('/graphiql', graphiqlExpress({ endpointURL: '/graphql' }));\napp.listen(port, (err) =\u003e {\n    if (err) throw err\n    console.log(`\u003e Ready on http://localhost:${port}/graphql`)\n})\n```\n##### ES5\n```javascript\nconst makeSchema = require(\"graphql-spotify\").makeSchema;\nconst graphqlExpress = require('apollo-server-express').graphqlExpress;\nconst graphiqlExpress = require('apollo-server-express').graphiqlExpress;\nconst express = require('express');\nconst bodyParser = require('body-parser')\n// Initialize the app\nconst port = parseInt(process.env.PORT, 10) || 3000\nconst app = express();\n// bodyParser is needed just for POST.\napp.use(\n    '/graphql',\n    bodyParser.json(),\n    graphqlExpress(req =\u003e {\n        let token;\n        //... somewhere the spotify token is gotten from the context\n        const schema = makeSchema(token)\n        return { schema }\n    }));\n// GraphiQL, a visual editor for queries\napp.use('/graphiql', graphiqlExpress({ endpointURL: '/graphql' }));\napp.listen(port, (err) =\u003e {\n    if (err) throw err\n    console.log(`\u003e Ready on http://localhost:${port}/graphql`)\n})\n```\n\n## Contribute\nAnyone is welcome! Take a look at [Roadmap.md](Roadmap.md) for PR ideas and file some issues!\n\n## Used By\n* [Graphql Spotify Example](https://github.com/goldensunliu/graphql-spotify-example)\n* [Spotify Insight App](https://noise.sitianliu.com/login)\n\n## Created By\n[Sitian Liu](https://www.sitianliu.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldensunliu%2Fgraphql-spotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoldensunliu%2Fgraphql-spotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoldensunliu%2Fgraphql-spotify/lists"}