Created
May 2, 2020 12:00
-
-
Save a7v8x/716b5739e484435bc9033089841ae838 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
GraphQLString, | |
GraphQLInputObjectType, | |
GraphQLNonNull, | |
GraphQLBoolean, | |
GraphQLInt, | |
GraphQLFloat, | |
} from 'graphql'; | |
import TaskStateEnum from './TaskStateEnumType'; | |
import DateTime from '../custom-scalars/DateTime'; | |
const CreateTaskInputType = new GraphQLInputObjectType({ | |
name: 'CreateTaskInput', | |
fields: () => ({ | |
name: { | |
type: new GraphQLNonNull(GraphQLString), | |
}, | |
completed: { | |
type: GraphQLBoolean, | |
defaultValue: false, | |
}, | |
state: { | |
type: TaskStateEnum, | |
defaultValue: TaskStateEnum.getValue("ASSIGNED"), | |
}, | |
taskPriority: { | |
type: GraphQLInt, | |
defaultValue: 1, | |
}, | |
progress: { | |
type: GraphQLFloat, | |
defaultValue: 0, | |
}, | |
dueDate: { | |
type: DateTime, | |
}, | |
}), | |
}); | |
export default CreateTaskInputType; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment