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 entity’s
|
|
|
|
|
|
lifetime, including whether it has ended (even if the date is unknown).`,
|
2016-08-08 07:54:06 +00:00
|
|
|
|
fields: () => ({
|
2016-11-29 03:14:43 +00:00
|
|
|
|
begin: {
|
|
|
|
|
|
type: DateType,
|
|
|
|
|
|
description: 'The start date of the entity’s life span.'
|
|
|
|
|
|
},
|
|
|
|
|
|
end: {
|
|
|
|
|
|
type: DateType,
|
|
|
|
|
|
description: 'The end date of the entity’s life span.'
|
|
|
|
|
|
},
|
|
|
|
|
|
ended: {
|
|
|
|
|
|
type: GraphQLBoolean,
|
|
|
|
|
|
description: 'Whether or not the entity’s life span has ended.'
|
|
|
|
|
|
}
|
2016-08-08 07:54:06 +00:00
|
|
|
|
})
|
|
|
|
|
|
})
|