graphbrainz/src/types/series.js

39 lines
843 B
JavaScript
Raw Normal View History

2016-08-31 06:33:29 +00:00
import { GraphQLObjectType } from 'graphql/type'
import Node from './node'
import Entity from './entity'
import {
id,
mbid,
name,
disambiguation,
relationships,
collections,
tags,
fieldWithID,
2016-11-28 14:43:32 +00:00
connectionWithExtras
} from './helpers'
2016-08-31 06:33:29 +00:00
const Series = new GraphQLObjectType({
name: 'Series',
2016-11-26 01:38:32 +00:00
description: `A [series](https://musicbrainz.org/doc/Series) is a sequence of
separate release groups, releases, recordings, works or events with a common
theme.`,
2016-08-31 06:33:29 +00:00
interfaces: () => [Node, Entity],
fields: () => ({
id,
mbid,
name,
disambiguation,
2016-11-26 01:38:32 +00:00
...fieldWithID('type', {
description: `The type primarily describes what type of entity the series
contains.`
}),
relationships,
collections,
tags
2016-08-31 06:33:29 +00:00
})
})
2016-11-28 14:43:32 +00:00
export const SeriesConnection = connectionWithExtras(Series)
2016-08-31 06:33:29 +00:00
export default Series