mirror of
https://github.com/BradNut/graphbrainz
synced 2025-09-08 17:40:32 +00:00
22 lines
632 B
JavaScript
22 lines
632 B
JavaScript
|
|
import { GraphQLObjectType, GraphQLNonNull } from 'graphql/type'
|
||
|
|
import Entity from './entity'
|
||
|
|
import { URLString } from './scalars'
|
||
|
|
import { id, relations, createPageType } from './helpers'
|
||
|
|
|
||
|
|
const URL = new GraphQLObjectType({
|
||
|
|
name: 'URL',
|
||
|
|
description:
|
||
|
|
'A 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: () => [Entity],
|
||
|
|
fields: () => ({
|
||
|
|
id,
|
||
|
|
resource: { type: new GraphQLNonNull(URLString) },
|
||
|
|
relations
|
||
|
|
})
|
||
|
|
})
|
||
|
|
|
||
|
|
export const URLPage = createPageType(URL)
|
||
|
|
export default URL
|