{"id":13553532,"url":"https://github.com/exogen/graphbrainz","last_synced_at":"2025-04-06T07:15:57.090Z","repository":{"id":37735386,"uuid":"65151260","full_name":"exogen/graphbrainz","owner":"exogen","description":"A fully-featured GraphQL interface for the MusicBrainz API.","archived":false,"fork":false,"pushed_at":"2024-09-19T17:32:49.000Z","size":4274,"stargazers_count":164,"open_issues_count":24,"forks_count":30,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-30T04:10:04.771Z","etag":null,"topics":["api","express","graphql","graphql-schema","middleware","musicbrainz","musicbrainz-api","relay"],"latest_commit_sha":null,"homepage":"","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/exogen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"exogen","buy_me_a_coffee":"mosswood"}},"created_at":"2016-08-07T19:51:35.000Z","updated_at":"2024-12-30T21:49:49.000Z","dependencies_parsed_at":"2024-06-18T18:17:30.299Z","dependency_job_id":"34551683-c047-4111-b29c-89f1b894dce6","html_url":"https://github.com/exogen/graphbrainz","commit_stats":{"total_commits":234,"total_committers":3,"mean_commits":78.0,"dds":"0.16666666666666663","last_synced_commit":"129296e0de3478663ae9de5949646ce8f706057f"},"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exogen%2Fgraphbrainz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exogen%2Fgraphbrainz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exogen%2Fgraphbrainz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exogen%2Fgraphbrainz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exogen","download_url":"https://codeload.github.com/exogen/graphbrainz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445682,"owners_count":20939961,"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","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":["api","express","graphql","graphql-schema","middleware","musicbrainz","musicbrainz-api","relay"],"created_at":"2024-08-01T12:02:27.377Z","updated_at":"2025-04-06T07:15:57.068Z","avatar_url":"https://github.com/exogen.png","language":"JavaScript","funding_links":["https://github.com/sponsors/exogen","https://buymeacoffee.com/mosswood","https://www.buymeacoffee.com/mosswood"],"categories":["JavaScript"],"sub_categories":[],"readme":"# GraphBrainz\n\n[![coverage](https://img.shields.io/codecov/c/github/exogen/graphbrainz.svg)](https://codecov.io/gh/exogen/graphbrainz)\n[![npm version](https://img.shields.io/npm/v/graphbrainz.svg)](https://www.npmjs.com/package/graphbrainz)\n[![license](https://img.shields.io/npm/l/graphbrainz.svg)](https://github.com/exogen/graphbrainz/blob/master/LICENSE)\n\nA [GraphQL][] schema, [Express][] server, and middleware for querying the\n[MusicBrainz][] API. It features an [extensible](./docs/extensions) schema to\nadd integration with Discogs, Spotify, Last.fm, fanart.tv, and more!\n\n**[Try out the live demo!][demo]** :bulb: Use the “Docs” sidebar, the\n[schema][], or the [types][] docs to help construct your query.\n\n## Support\n\nDid this project bring you joy? Want to support updates? Check out\n[my GitHub Sponsors page](https://github.com/sponsors/exogen).\n\nAlternatively…\n\n\u003ca href=\"https://www.buymeacoffee.com/mosswood\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\"\u003e\u003c/a\u003e\n\n## Install\n\nInstall with npm:\n\n```sh\nnpm install graphbrainz --save\n```\n\nInstall with Yarn:\n\n```sh\nyarn add graphbrainz\n```\n\n_GraphBrainz is written and distributed as native ECMAScript modules\n(ESM) and requires a compatible version of Node.js_\n\n## Contents\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- [Usage](#usage)\n  - [As a standalone server](#as-a-standalone-server)\n  - [As middleware](#as-middleware)\n  - [As a client](#as-a-client)\n  - [Environment Variables](#environment-variables)\n  - [Debugging](#debugging)\n- [Example Queries](#example-queries)\n  - [Pagination](#pagination)\n- [Questions](#questions)\n- [Schema](#schema)\n  - [Extending the schema](#extending-the-schema)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Usage\n\nThis package can be used both as a standalone GraphQL server and as Express\nmiddleware supplying a GraphQL endpoint.\n\n### As a standalone server\n\nRun the included `graphbrainz` executable to start the server. The server is\nconfigured using [environment variables](#environment-variables).\n\n```sh\n$ graphbrainz\nListening on port 3000.\n```\n\nDevelopment mode features like JSON pretty printing and the [GraphiQL][]\ninterface will be enabled unless the server is run with `NODE_ENV=production`.\n\nNote that if you are not running the standalone server within another Node\nproject, you may wish to install this package globally so that the `graphbrainz`\nscript is globally available:\n\n```sh\nnpm install -g graphbrainz\n```\n\n### As middleware\n\nIf you have an existing Express server and want to add this GraphQL service as\nan endpoint, or you just want more customization, use the middleware.\n\n```js\nimport express from 'express';\nimport { middleware as graphbrainz } from 'graphbrainz';\n\nconst app = express();\n\n// Use the default options:\napp.use('/graphbrainz', graphbrainz());\n\n// or, pass some options:\napp.use('/graphbrainz', graphbrainz({\n  client: new MusicBrainz({ ... }),\n  graphiql: true,\n  ...\n}));\n\napp.listen(3000);\n```\n\nThe `graphbrainz` middleware function accepts the following options:\n\n- **`client`**: A custom API client instance to use. See the\n  [client submodule](src/api/client.js) for help with creating a custom\n  instance. You probably only need to do this if you want to adjust the rate\n  limit and retry behavior.\n- Any remaining options are passed along to the standard GraphQL middleware. See\n  the [express-graphql][] documentation for more information.\n\n### As a client\n\nIf you just want to make queries from your app without running a separate server\nor exposing a GraphQL endpoint, use the GraphBrainz schema with a library like\n[GraphQL.js][graphql-js]. You just need to create the `context` object that the\nGraphBrainz resolvers expect, like so:\n\n```js\nimport { graphql } from 'graphql';\nimport { MusicBrainz, createContext, baseSchema } from 'graphbrainz';\n\nconst client = new MusicBrainz();\nconst context = createContext({ client });\n\ngraphql(\n  schema,\n  `\n    {\n      lookup {\n        releaseGroup(mbid: \"99599db8-0e36-4a93-b0e8-350e9d7502a9\") {\n          title\n        }\n      }\n    }\n  `,\n  null,\n  context\n)\n  .then((result) =\u003e {\n    const { releaseGroup } = result.data.lookup;\n    console.log(`The album title is “${releaseGroup.title}”.`);\n  })\n  .catch((err) =\u003e {\n    console.error(err);\n  });\n```\n\n### Environment Variables\n\n- **`MUSICBRAINZ_BASE_URL`**: The base MusicBrainz API URL to use. Change this\n  if you are running your own MusicBrainz mirror. Defaults to\n  `http://musicbrainz.org/ws/2/`.\n- **`GRAPHBRAINZ_PATH`**: The URL route at which to expose the GraphQL endpoint,\n  if running the standalone server. Defaults to `/`.\n- **`GRAPHBRAINZ_CORS_ORIGIN`**: The value of the `origin` option to pass to the\n  [CORS][cors] middleware. Valid values are `true` to reflect the request\n  origin, a specific origin string to allow, `*` to allow all origins, and\n  `false` to disable CORS (the default).\n- **`GRAPHBRAINZ_CACHE_SIZE`**: The maximum number of REST API responses to\n  cache. Increasing the cache size and TTL will greatly lower query execution\n  time for complex queries involving frequently accessed entities. Defaults to\n  `8192`.\n- **`GRAPHBRAINZ_CACHE_TTL`**: The maximum age of REST API responses in the\n  cache, in milliseconds. Responses older than this will be disposed of (and\n  re-requested) the next time they are accessed. Defaults to `86400000` (one\n  day).\n- **`GRAPHBRAINZ_GRAPHIQL`**: Set this to `true` if you want to force the\n  [GraphiQL][] interface to be available even in production mode.\n- **`GRAPHBRAINZ_EXTENSIONS`**: A JSON array of module paths to load as\n  [extensions](./docs/extensions).\n- **`PORT`**: Port number to use, if running the standalone server.\n\nWhen running the standalone server, [dotenv][] is used to load these variables\nfrom a `.env` file, if one exists in the current working directory. This just\nmakes it more convenient to launch the server with certain settings. See the\n[dotenv][] package for more information.\n\n### Debugging\n\nThe `DEBUG` environment variable can be used to enable logging for all (or just\nsome) of this package’s submodules:\n\n```sh\n$ DEBUG=graphbrainz:* graphbrainz\n```\n\nSee the [debug][] package for more information.\n\n## Example Queries\n\nNirvana albums and each album’s singles\n([try it](\u003chttps://graphbrainz.fly.dev/?query=query%20NirvanaAlbumSingles%20%7B%0A%20%20lookup%20%7B%0A%20%20%20%20artist(mbid%3A%20%225b11f4ce-a62d-471e-81fc-a69a8278c7da%22)%20%7B%0A%20%20%20%20%20%20name%0A%20%20%20%20%20%20releaseGroups(type%3A%20ALBUM)%20%7B%0A%20%20%20%20%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20%20%20%20%20node%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20title%0A%20%20%20%20%20%20%20%20%20%20%20%20firstReleaseDate%0A%20%20%20%20%20%20%20%20%20%20%20%20relationships%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20releaseGroups(type%3A%20%22single%20from%22)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20node%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20target%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20...%20on%20ReleaseGroup%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20title%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20firstReleaseDate%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A\u0026operationName=NirvanaAlbumSingles\u003e)):\n\n```graphql\nquery NirvanaAlbumSingles {\n  lookup {\n    artist(mbid: \"5b11f4ce-a62d-471e-81fc-a69a8278c7da\") {\n      name\n      releaseGroups(type: ALBUM) {\n        edges {\n          node {\n            title\n            firstReleaseDate\n            relationships {\n              releaseGroups(type: \"single from\") {\n                edges {\n                  node {\n                    target {\n                      ... on ReleaseGroup {\n                        title\n                        firstReleaseDate\n                      }\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n```\n\n### Pagination\n\nThe first five labels with “Apple” in the name\n([try it](\u003chttps://graphbrainz.fly.dev/?query=query%20AppleLabels%20%7B%0A%20%20search%20%7B%0A%20%20%20%20labels(query%3A%20%22Apple%22%2C%20first%3A%205)%20%7B%0A%20%20%20%20%20%20...labelResults%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A%0Afragment%20labelResults%20on%20LabelConnection%20%7B%0A%20%20pageInfo%20%7B%0A%20%20%20%20endCursor%0A%20%20%7D%0A%20%20edges%20%7B%0A%20%20%20%20cursor%0A%20%20%20%20node%20%7B%0A%20%20%20%20%20%20mbid%0A%20%20%20%20%20%20name%0A%20%20%20%20%20%20type%0A%20%20%20%20%20%20area%20%7B%0A%20%20%20%20%20%20%20%20name%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A\u0026operationName=AppleLabels\u003e)):\n\n```graphql\nquery AppleLabels {\n  search {\n    labels(query: \"Apple\", first: 5) {\n      ...labelResults\n    }\n  }\n}\n\nfragment labelResults on LabelConnection {\n  pageInfo {\n    endCursor\n  }\n  edges {\n    cursor\n    node {\n      mbid\n      name\n      type\n      area {\n        name\n      }\n    }\n  }\n}\n```\n\n…and the next five, using the `endCursor` from the previous result\n([try it](\u003chttps://graphbrainz.fly.dev/?query=query%20AppleLabels%20%7B%0A%20%20search%20%7B%0A%20%20%20%20labels(query%3A%20%22Apple%22%2C%20first%3A%205%2C%20after%3A%20%22YXJyYXljb25uZWN0aW9uOjQ%3D%22)%20%7B%0A%20%20%20%20%20%20...labelResults%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A%0Afragment%20labelResults%20on%20LabelConnection%20%7B%0A%20%20pageInfo%20%7B%0A%20%20%20%20endCursor%0A%20%20%7D%0A%20%20edges%20%7B%0A%20%20%20%20cursor%0A%20%20%20%20node%20%7B%0A%20%20%20%20%20%20mbid%0A%20%20%20%20%20%20name%0A%20%20%20%20%20%20type%0A%20%20%20%20%20%20area%20%7B%0A%20%20%20%20%20%20%20%20name%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A\u0026operationName=AppleLabels\u003e)):\n\n```graphql\nquery AppleLabels {\n  search {\n    labels(query: \"Apple\", first: 5, after: \"YXJyYXljb25uZWN0aW9uOjQ=\") {\n      ...labelResults\n    }\n  }\n}\n```\n\nWho the members of the band on an Apple Records release married, and when\n([try it](\u003chttps://graphbrainz.fly.dev/?query=query%20AppleRecordsMarriages%20%7B%0A%20%20search%20%7B%0A%20%20%20%20labels(query%3A%20%22Apple%20Records%22%2C%20first%3A%201)%20%7B%0A%20%20%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20%20%20node%20%7B%0A%20%20%20%20%20%20%20%20%20%20name%0A%20%20%20%20%20%20%20%20%20%20disambiguation%0A%20%20%20%20%20%20%20%20%20%20country%0A%20%20%20%20%20%20%20%20%20%20releases(first%3A%201)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20node%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20title%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20date%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20artists%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20node%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20...bandMembers%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A%0Afragment%20bandMembers%20on%20Artist%20%7B%0A%20%20relationships%20%7B%0A%20%20%20%20artists(direction%3A%20%22backward%22%2C%20type%3A%20%22member%20of%20band%22)%20%7B%0A%20%20%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20%20%20node%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%0A%20%20%20%20%20%20%20%20%20%20target%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20...%20on%20Artist%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20...marriages%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A%0Afragment%20marriages%20on%20Artist%20%7B%0A%20%20relationships%20%7B%0A%20%20%20%20artists(type%3A%20%22married%22)%20%7B%0A%20%20%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20%20%20node%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%0A%20%20%20%20%20%20%20%20%20%20direction%0A%20%20%20%20%20%20%20%20%20%20begin%0A%20%20%20%20%20%20%20%20%20%20end%0A%20%20%20%20%20%20%20%20%20%20target%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20...%20on%20Artist%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20name%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A\u0026operationName=AppleRecordsMarriages\u003e)):\n\n```graphql\nquery AppleRecordsMarriages {\n  search {\n    labels(query: \"Apple Records\", first: 1) {\n      edges {\n        node {\n          name\n          disambiguation\n          country\n          releases(first: 1) {\n            edges {\n              node {\n                title\n                date\n                artists {\n                  edges {\n                    node {\n                      name\n                      ...bandMembers\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\nfragment bandMembers on Artist {\n  relationships {\n    artists(direction: \"backward\", type: \"member of band\") {\n      edges {\n        node {\n          type\n          target {\n            ... on Artist {\n              name\n              ...marriages\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\nfragment marriages on Artist {\n  relationships {\n    artists(type: \"married\") {\n      edges {\n        node {\n          type\n          direction\n          begin\n          end\n          target {\n            ... on Artist {\n              name\n            }\n          }\n        }\n      }\n    }\n  }\n}\n```\n\nImages of Tom Petty provided by various extensions\n([try it](\u003chttps://graphbrainz.fly.dev/?query=query%20TomPettyImages%20%7B%0A%20%20lookup%20%7B%0A%20%20%20%20artist(mbid%3A%20%225ca3f318-d028-4151-ac73-78e2b2d6cdcc%22)%20%7B%0A%20%20%20%20%20%20name%0A%20%20%20%20%20%20mediaWikiImages%20%7B%0A%20%20%20%20%20%20%20%20url%0A%20%20%20%20%20%20%20%20objectName%0A%20%20%20%20%20%20%20%20descriptionHTML%0A%20%20%20%20%20%20%20%20licenseShortName%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20fanArt%20%7B%0A%20%20%20%20%20%20%20%20thumbnails%20%7B%0A%20%20%20%20%20%20%20%20%20%20url%0A%20%20%20%20%20%20%20%20%20%20likeCount%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20theAudioDB%20%7B%0A%20%20%20%20%20%20%20%20logo%0A%20%20%20%20%20%20%20%20biography%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A\u0026operationName=TomPettyImages\u003e)):\n\n```graphql\nquery TomPettyImages {\n  lookup {\n    artist(mbid: \"5ca3f318-d028-4151-ac73-78e2b2d6cdcc\") {\n      name\n      mediaWikiImages {\n        url\n        objectName\n        descriptionHTML\n        licenseShortName\n      }\n      fanArt {\n        thumbnails {\n          url\n          likeCount\n        }\n      }\n      theAudioDB {\n        logo\n        biography\n      }\n    }\n  }\n}\n```\n\nYou can find more example queries in the [schema tests][].\n\n## Questions\n\n**What’s with the cumbersome `edges`/`node` nesting? Why `first`/`after` instead\nof `limit`/`offset`? Why `mbid` instead of `id`?**\n\nYou can thank [Relay][] for that; these are properties of a Relay-compliant\nschema. The schema was originally designed to be more user-friendly, but in the\nend I decided that being compatible with Relay was a worthwhile feature. I\nagree, it’s ugly.\n\nThe GraphBrainz schema includes an extra `nodes` field on every connection type.\nIf you only want the nodes and no other fields on `edges`, you can use `nodes`\nas a shortcut.\n\nDon’t forget that you can also use [GraphQL aliases][aliases] to rename fields\nto your liking. For example, the following query renames `edges`, `node`, and\n`mbid` to `results`, `releaseGroup`, and `id`, respectively:\n\n```graphql\nquery ChristmasAlbums {\n  search {\n    releaseGroups(query: \"Christmas\") {\n      results: edges {\n        releaseGroup: node {\n          id: mbid\n          title\n        }\n      }\n    }\n  }\n}\n```\n\n**Why does my query take so long?**\n\nIt’s likely that your query requires multiple round trips to the MusicBrainz\nREST API, which is subject to [rate limiting][]. While the query resolver tries\nvery hard to fetch only the data necessary, and with the smallest number of API\nrequests, it is not 100% optimal (yet). Make sure you are only requesting the\nfields you need and a reasonable level of nested entities – unless you are\nwilling to wait.\n\nYou can also set up a [local MusicBrainz mirror][mirror] and configure\nGraphBrainz to use that with no rate limiting.\n\n## Schema\n\nThe [types][] document is the easiest to browse representation of the schema, or\nyou can read the [schema in GraphQL syntax][schema].\n\n### Extending the schema\n\nThe GraphBrainz schema can easily be extended to add integrations with\nthird-party services. See the [Extensions](./docs/extensions) docs for more\ninfo.\n\n[demo]: https://graphbrainz.fly.dev/\n[express]: http://expressjs.com/\n[musicbrainz]: https://musicbrainz.org/\n[graphql]: http://graphql.org/\n[express-graphql]: https://www.npmjs.com/package/express-graphql\n[dotenv]: https://www.npmjs.com/package/dotenv\n[debug]: https://www.npmjs.com/package/debug\n[graphiql]: https://github.com/graphql/graphiql\n[graphql-js]: https://github.com/graphql/graphql-js\n[relay]: https://facebook.github.io/relay/\n[schema]: docs/schema.md\n[types]: docs/types.md\n[rate limiting]: https://musicbrainz.org/doc/XML_Web_Service/Rate_Limiting\n[mirror]: https://musicbrainz.org/doc/MusicBrainz_Server/Setup\n[aliases]: http://graphql.org/learn/queries/#aliases\n[schema tests]: test/_schema.js\n[cors]: https://github.com/expressjs/cors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexogen%2Fgraphbrainz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexogen%2Fgraphbrainz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexogen%2Fgraphbrainz/lists"}