Spotify GraphQL Server: 获取外部数据

该示例演示了如何构建 GraphQL 服务器,从外部 API(Spotify)获取数据,可作为 GraphQL 查询的游乐场使用。

先决条件

  • 安装 Node.js >= 8
  • 运行 npm install

运行服务器

  • npm start 启动 GraphQL 服务器
  • npm run watch 启动 GraphQL 服务器,更改后自动重启

运行测试

  • npm test

获取 GraphQL 模式 IDL

  • npm run printSchema
zip 文件大小:34.28KB