2016-08-31 06:33:29 +00:00
|
|
|
import { GraphQLObjectType } from 'graphql/type'
|
|
|
|
|
import { connectionDefinitions } from 'graphql-relay'
|
|
|
|
|
import Node from './node'
|
|
|
|
|
import Entity from './entity'
|
|
|
|
|
import {
|
|
|
|
|
id,
|
|
|
|
|
mbid,
|
|
|
|
|
name,
|
|
|
|
|
disambiguation,
|
|
|
|
|
fieldWithID
|
|
|
|
|
} from './helpers'
|
|
|
|
|
|
|
|
|
|
const Series = new GraphQLObjectType({
|
|
|
|
|
name: 'Series',
|
|
|
|
|
description:
|
|
|
|
|
'A series is a sequence of separate release groups, releases, ' +
|
|
|
|
|
'recordings, works or events with a common theme.',
|
|
|
|
|
interfaces: () => [Node, Entity],
|
|
|
|
|
fields: () => ({
|
|
|
|
|
id,
|
|
|
|
|
mbid,
|
|
|
|
|
name,
|
|
|
|
|
disambiguation,
|
|
|
|
|
...fieldWithID('type')
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const { connectionType: SeriesConnection } = connectionDefinitions({ nodeType: Series })
|
|
|
|
|
export { SeriesConnection }
|
|
|
|
|
export default Series
|