graphbrainz/src/types/url.js

22 lines
632 B
JavaScript
Raw Normal View History

2016-08-20 05:59:32 +00:00
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