graphbrainz

A fully-featured GraphQL interface for the MusicBrainz API.

MIT License

Downloads
308
Stars
154
Committers
2

Bot releases are hidden (Show)

graphbrainz - Latest Release

Published by exogen over 3 years ago

Breaking Change

  • This package is now written and distributed as native ECMAScript modules. The minimum Node.js version is now v12.18.0.
  • Public exports are now defined using the package.json exports field. No more reaching into graphbrainz/lib to import various helpers; instead, most helpers are exported from the package root (including everything necessary to implement extensions). The built-in extensions are still available as graphbrainz/extensions/cover-art-archive, graphbrainz/extensions/fanart-tv, graphbrainz/extensions/mediawiki, and graphbrainz/extensions/the-audio-db.
  • There is no longer a default export; the GraphBrainz middleware is now exported under the name middleware.
  • When calling createSchema or createContext, the extensions option must contain the already resolved extension objects to apply, rather than the module paths to import. Using module paths with dynamic import() would require making these functions asynchronous, which was too difficult to work with. You can still supply a list of module names to the GraphBrainz middleware function, since that can work asynchronously.
  • The HTTP client used by the built-in Client class now uses got instead of request (which has been deprecated). Extensions subclassing Client will potentially need to update the options they pass when making calls.
  • The various retry options previously implemented by Client are now deprecated. It now uses got’s retry support via the retry option, and will use got’s defaults if not specified.

Internal

  • All dependencies upgraded.
  • No more Babel, syntax supported by modern Node.js is used instead.
  • Migrated off of replayer and onto ava-nock for HTTP record & replay in tests.
graphbrainz -

Published by exogen about 6 years ago

Added

  • Support for tracks via the tracks field on the Media type, which returns a list of the new Track type.
graphbrainz -

Published by exogen about 6 years ago

Fixed

  • Fixed browsing recordings by ISRC (#86).
  • Fixed artistCredits field sending the wrong inc parameter (#86).
graphbrainz -

Published by exogen about 6 years ago

Fixes

  • If a recording's isrcs field is null, assume it is because it was not fetched with isrcs included, and perform a new lookup request to get them. There are likely many other fields suffering from this problem, but it will not be fixed until a large refactor.
graphbrainz -

Published by exogen about 6 years ago

Fixed

  • Some TheAudioDB music video URLs do not include the protocol. Add it automatically (assume https:) instead of returning null with an error.
  • Correctly return empty arrays instead of null for empty fanart.tv image lists.
graphbrainz -

Published by exogen about 6 years ago

Fixed

  • Handle a case where the albums property is missing from fanart.tv artist responses.
graphbrainz -

Published by exogen about 6 years ago

Changed

  • Node 8.10 is now the minimum supported version of Node.
  • All dependencies have been upgraded, including GraphQL.
  • Extensions defined using the GraphQL SDL now use the new type and field description syntax.
  • Batching has been disabled on all DataLoader instances, since the queries they make do not support batching anyway. This prevents a single error from causing every other query to bail out (due to Promise.all), limiting the number of null fields and errors returned.
  • Some fields in TheAudioDB extension have been updated from Int to Float, since Int only supports 32-bit integers. It turns out people have watched Despacito on YouTube an absurd number of times.
    • The updated fields are: salesCount, scoreVotes, viewCount, likeCount, dislikeCount, commentCount, scoreVotes.

Fixed

  • TheAudioDB now redirects traffic to HTTPS, but its SSL terminator is broken and only supports TLS 1.0. For the time being, TheAudioDB client forces requests to use TLS 1.0.
  • The MediaWiki client now properly encodes page titles that contain special characters instead of double encoding them. API requests for those pages will no longer fail.

See also

graphbrainz -

Published by exogen almost 7 years ago

Added

  • Added missing description for the lang argument in TheAudioDB extension.
  • Extension schemas now use a gql template tag, which parses them into a GraphQL AST. I didn't use graphql-tag because it currently doesn't support parsing descriptions. Instead I made a very simple tag that just uses graphql.parse(). This tag is exported as graphbrainz/lib/tag for any third-party extensions to use. The benefits of using it are ensuring syntactic correctness, allowing syntax highlighting of the schema literal, and allowing Prettier to format them.
graphbrainz -

Published by exogen almost 7 years ago

graphbrainz -

Published by exogen almost 7 years ago

Added

  • New defaultExtensions export. This makes it easier to add extensions while keeping the defaults.

Changed

  • Fixed a bug introduced by schema extensions, where the resolveType function for Node and Entity would return type instances that had been overwritten by extending the schema. See #49.
graphbrainz -

Published by exogen almost 7 years ago

Changed

  • Don't fail if options are passed to createContext without an extensions array.
graphbrainz -

Published by exogen almost 7 years ago

Added

  • The Area type now has the missing type and typeID fields.
  • The exported start() function (for starting the standalone server) now accepts options, which it passes along to the middleware. This makes demoing third-party extension modules easier.

Changed

  • If an entity has a typeID field but it wasn't returned by the endpoint that generated the entity, fetch the entity from a lookup. In the future this should be done for all fields, as different endpoints return a mishmash of fields and GraphBrainz should be agnostic of this.
  • Schema docs are now generated using the new updateSchema feature of graphql-markdown.

Removed

  • Unused deep-diff dependency.
graphbrainz -

Published by exogen almost 7 years ago

GraphBrainz 7.0.0 is here with amazing new features! (This is the final release of everything added in the recent prereleases. Their release notes are consolidated here for convenience.)

⚠️ This release contains breaking schema changes.

Added

  • Extensions! You can now easily extend the GraphBrainz schema to add integrations with third-party services. This addition includes:
  • CORS support via the cors middleware package. This applies to the standalone server and can be controlled with the GRAPHBRAINZ_CORS_ORIGIN environment variable. The default is to disable CORS.

Changed

  • The Cover Art Archive client, schema, and loaders are now contained in a built-in extension.
    • Cover Art Archive related types are no longer part of the base schema and most of their names have changed.
    • The Cover Art Archive loaders now have their own cache instead of sharing the MusicBrainz cache.
    • The coverArt field was renamed to coverArtArchive. This more closely matches the name of the actual field on releases in the MusicBrainz API, and is more consistent with other extensions.
  • When generating schema.json, output the full result of the introspection query (the top-level data property) instead of a top-level __schema field. This makes the schema.json file compatible with Relay tools like relay-compiler.
  • Node support was updated from versions 4 – 7 to versions 6 – 8.

Removed

  • Due to the way the new Cover Art Archive extension works, the darkened cover art field was removed. This may be re-added in the future.
graphbrainz -

Published by exogen almost 7 years ago

Added

  • CORS support via the cors middleware package. This applies to the standalone server and can be controlled with the GRAPHBRAINZ_CORS_ORIGIN environment variable. The default is to disable CORS.
graphbrainz -

Published by exogen almost 7 years ago

Changes

  • Another breaking change: when generating schema.json, output the full result of the introspection query (the top-level data property) instead of a top-level __schema field. This makes the schema.json file compatible with Relay tools like relay-compiler.
graphbrainz -

Published by exogen almost 7 years ago

Added

  • Fixed missing MediaWikiImage description.
graphbrainz -

Published by exogen almost 7 years ago

⚠️ This release contains breaking schema changes.

Try out this prerelease like so:

$ npm install graphbrainz@next

Added

Changed

  • The Cover Art Archive client, schema, and loaders are now contained in a built-in extension.
    • Cover Art Archive related types are no longer part of the base schema and most of their names have changed.
    • The Cover Art Archive loaders now have their own cache instead of sharing the MusicBrainz cache.
    • The coverArt field was renamed to coverArtArchive. This more closely matches the name of the actual field on releases in the MusicBrainz API, and is more consistent with other extensions.
  • Node support was updated from versions 4 – 7 to versions 6 – 8.

Removed

  • The darkened cover art field was removed. This may be re-added in the future if there is demand.
graphbrainz -

Published by exogen about 7 years ago

Added

  • Every connection type now includes a nodes field, taking inspiration from the GitHub GraphQL schema. If you only want the nodes from a connection and no other fields from edges, you can use nodes as a shortcut.
graphbrainz -

Published by exogen about 7 years ago

Changed

  • Upgraded dependencies to their latest versions.
  • The Rating value field type was corrected from Int to Float.

Added

  • A new AVA test macro, testThrows, was created to work around graphql/graphql-js#910.
graphbrainz -

Published by exogen over 7 years ago

  • Bump dependencies.
  • Regenerate docs with latest version of graphql-markdown.
  • Remove old marked dependency.
Package Rankings
Top 6.72% on Proxy.golang.org
Top 4.17% on Npmjs.org
Badges
Extracted from project README
coverage npm version license
Related Projects