graphbrainz/src/types/life-span.js

22 lines
666 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { GraphQLObjectType, GraphQLBoolean } from 'graphql/type'
import { DateType } from './scalars'
export default new GraphQLObjectType({
name: 'LifeSpan',
description: `Fields indicating the begin and end date of an entitys
lifetime, including whether it has ended (even if the date is unknown).`,
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.'
}
})
})