graphbrainz/src/types/life-span.js

23 lines
666 B
JavaScript
Raw Normal View History

2016-08-08 07:54:06 +00:00
import { GraphQLObjectType, GraphQLBoolean } from 'graphql/type'
2016-08-20 05:59:32 +00:00
import { DateType } from './scalars'
2016-08-08 07:54:06 +00:00
export default new GraphQLObjectType({
name: 'LifeSpan',
2016-11-26 01:38:32 +00:00
description: `Fields indicating the begin and end date of an entitys
lifetime, including whether it has ended (even if the date is unknown).`,
2016-08-08 07:54:06 +00:00
fields: () => ({
begin: {
type: DateType,
description: 'The start date of the entitys life span.'
},
end: {
type: DateType,
description: 'The end date of the entitys life span.'
},
ended: {
type: GraphQLBoolean,
description: 'Whether or not the entitys life span has ended.'
}
2016-08-08 07:54:06 +00:00
})
})