graphbrainz/src/types/event.js

33 lines
743 B
JavaScript
Raw Normal View History

2016-08-20 05:59:32 +00:00
import { GraphQLObjectType, GraphQLString, GraphQLBoolean } from 'graphql/type'
import Entity from './entity'
import { Time } from './scalars'
import {
fieldWithID,
id,
name,
disambiguation,
lifeSpan,
createPageType
} from './helpers'
const Event = new GraphQLObjectType({
name: 'Event',
description:
'An organized event which people can attend, usually live performances ' +
'like concerts and festivals.',
interfaces: () => [Entity],
fields: () => ({
id,
name,
disambiguation,
lifeSpan,
time: { type: Time },
cancelled: { type: GraphQLBoolean },
setlist: { type: GraphQLString },
...fieldWithID('type')
})
})
export const EventPage = createPageType(Event)
export default Event