mirror of
https://github.com/BradNut/graphbrainz
synced 2025-09-08 17:40:32 +00:00
33 lines
743 B
JavaScript
33 lines
743 B
JavaScript
|
|
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
|