Releases: exogen/graphbrainz
Releases · exogen/graphbrainz
v9.0.0
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 intographbrainz/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 asgraphbrainz/extensions/cover-art-archive
,graphbrainz/extensions/fanart-tv
,graphbrainz/extensions/mediawiki
, andgraphbrainz/extensions/the-audio-db
. - There is no longer a default export; the GraphBrainz middleware is now exported under the name
middleware
. - When calling
createSchema
orcreateContext
, theextensions
option must contain the already resolved extension objects to apply, rather than the module paths to import. Using module paths with dynamicimport()
would require making these functions asynchronous, which was too difficult to work with. You can still supply a list of module names to the GraphBrainzmiddleware
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 subclassingClient
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 theretry
option, and will use got’s defaults if not specified.
Internal
v8.1.0
v8.0.4
v8.0.3
Fixes
- If a recording's
isrcs
field is null, assume it is because it was not fetched withisrcs
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.
v8.0.2
v8.0.1
v8.0.0
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
toFloat
, sinceInt
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
.
- The updated fields are:
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
v7.3.0
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 usesgraphql.parse()
. This tag is exported asgraphbrainz/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.
v7.3.0-0
v7.2.0
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.