mirror of
https://github.com/BradNut/graphbrainz
synced 2025-09-08 17:40:32 +00:00
* wip: Modernize dependencies, syntax, imports * Use final release of ava-nock v2 * Update Travis config * Remove Node 13 from test matrix * Replace errorClass with parseErrorMessage in subclasses * define exports, apply updated lint rules * Remove markdown eslint plugin * Update README * v9.0.0-beta.1 * Add gql tag to exports * v9.0.0-beta.2 * Bump ava-nock, add test * Update dataloader loadMany usage * Add modules note to README * Add retry option to got calls
27 lines
849 B
JavaScript
27 lines
849 B
JavaScript
import GraphQL from 'graphql';
|
|
import { Node } from './node.js';
|
|
import { Entity } from './entity.js';
|
|
import { URLString } from './scalars.js';
|
|
import { id, mbid, connectionWithExtras } from './helpers.js';
|
|
import { relationships } from './relationship.js';
|
|
|
|
const { GraphQLObjectType, GraphQLNonNull } = GraphQL;
|
|
|
|
export const URL = new GraphQLObjectType({
|
|
name: 'URL',
|
|
description: `A [URL](https://musicbrainz.org/doc/URL) pointing to a resource
|
|
external to MusicBrainz, i.e. an official homepage, a site where music can be
|
|
acquired, an entry in another database, etc.`,
|
|
interfaces: () => [Node, Entity],
|
|
fields: () => ({
|
|
id,
|
|
mbid,
|
|
resource: {
|
|
type: new GraphQLNonNull(URLString),
|
|
description: 'The actual URL string.',
|
|
},
|
|
relationships,
|
|
}),
|
|
});
|
|
|
|
export const URLConnection = connectionWithExtras(URL);
|