Skip to content

Commit

Permalink
chore: Remove new GraphQLNonNull from questionnaire resource (#28)
Browse files Browse the repository at this point in the history
* Remove `GraphQLNonNull`
  • Loading branch information
sureshHARDIYA authored and Robert-W committed May 21, 2019
1 parent c91379b commit f8d0c41
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = new GraphQLInputObjectType({
"A potential answer that's allowed as the answer to this question.",
},
valueInteger: {
type: new GraphQLNonNull(GraphQLInt),
type: GraphQLInt,
description:
"A potential answer that's allowed as the answer to this question.",
},
Expand All @@ -53,7 +53,7 @@ module.exports = new GraphQLInputObjectType({
"A potential answer that's allowed as the answer to this question.",
},
valueDate: {
type: new GraphQLNonNull(DateScalar),
type: DateScalar,
description:
"A potential answer that's allowed as the answer to this question.",
},
Expand All @@ -63,7 +63,7 @@ module.exports = new GraphQLInputObjectType({
"A potential answer that's allowed as the answer to this question.",
},
valueTime: {
type: new GraphQLNonNull(TimeScalar),
type: TimeScalar,
description:
"A potential answer that's allowed as the answer to this question.",
},
Expand All @@ -73,17 +73,17 @@ module.exports = new GraphQLInputObjectType({
"A potential answer that's allowed as the answer to this question.",
},
valueString: {
type: new GraphQLNonNull(GraphQLString),
type: GraphQLString,
description:
"A potential answer that's allowed as the answer to this question.",
},
valueCoding: {
type: new GraphQLNonNull(require('./coding.input.js')),
type: require('./coding.input.js'),
description:
"A potential answer that's allowed as the answer to this question.",
},
valueReference: {
type: new GraphQLNonNull(GraphQLString),
type: GraphQLString,
description:
"A potential answer that's allowed as the answer to this question.",
},
Expand Down
18 changes: 9 additions & 9 deletions src/resources/4_0_0/inputs/questionnaireitemenablewhen.input.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ module.exports = new GraphQLInputObjectType({
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerDecimal: {
type: new GraphQLNonNull(GraphQLFloat),
type: GraphQLFloat,
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
Expand All @@ -84,7 +84,7 @@ module.exports = new GraphQLInputObjectType({
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerInteger: {
type: new GraphQLNonNull(GraphQLInt),
type: GraphQLInt,
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
Expand All @@ -94,7 +94,7 @@ module.exports = new GraphQLInputObjectType({
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerDate: {
type: new GraphQLNonNull(DateScalar),
type: DateScalar,
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
Expand All @@ -104,7 +104,7 @@ module.exports = new GraphQLInputObjectType({
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerDateTime: {
type: new GraphQLNonNull(DateTimeScalar),
type: DateTimeScalar,
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
Expand All @@ -114,7 +114,7 @@ module.exports = new GraphQLInputObjectType({
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerTime: {
type: new GraphQLNonNull(TimeScalar),
type: TimeScalar,
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
Expand All @@ -124,22 +124,22 @@ module.exports = new GraphQLInputObjectType({
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerString: {
type: new GraphQLNonNull(GraphQLString),
type: GraphQLString,
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerCoding: {
type: new GraphQLNonNull(require('./coding.input.js')),
type: require('./coding.input.js'),
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerQuantity: {
type: new GraphQLNonNull(require('./quantity.input.js')),
type: require('./quantity.input.js'),
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerReference: {
type: new GraphQLNonNull(GraphQLString),
type: GraphQLString,
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = new GraphQLObjectType({
"A potential answer that's allowed as the answer to this question.",
},
valueInteger: {
type: new GraphQLNonNull(GraphQLInt),
type: GraphQLInt,
description:
"A potential answer that's allowed as the answer to this question.",
},
Expand All @@ -54,7 +54,7 @@ module.exports = new GraphQLObjectType({
"A potential answer that's allowed as the answer to this question.",
},
valueDate: {
type: new GraphQLNonNull(DateScalar),
type: DateScalar,
description:
"A potential answer that's allowed as the answer to this question.",
},
Expand All @@ -64,7 +64,7 @@ module.exports = new GraphQLObjectType({
"A potential answer that's allowed as the answer to this question.",
},
valueTime: {
type: new GraphQLNonNull(TimeScalar),
type: TimeScalar,
description:
"A potential answer that's allowed as the answer to this question.",
},
Expand All @@ -74,18 +74,17 @@ module.exports = new GraphQLObjectType({
"A potential answer that's allowed as the answer to this question.",
},
valueString: {
type: new GraphQLNonNull(GraphQLString),
type: GraphQLString,
description:
"A potential answer that's allowed as the answer to this question.",
},
valueCoding: {
type: new GraphQLNonNull(require('./coding.schema.js')),
type: require('./coding.schema.js'),
description:
"A potential answer that's allowed as the answer to this question.",
},
valueReference: {
type: new GraphQLNonNull(
new GraphQLUnionType({
type: new GraphQLUnionType({
name:
'QuestionnaireitemanswerOptionvalueReference_valueReference_Union',
description:
Expand All @@ -97,7 +96,6 @@ module.exports = new GraphQLObjectType({
}
},
}),
),
description:
"A potential answer that's allowed as the answer to this question.",
},
Expand Down
20 changes: 9 additions & 11 deletions src/resources/4_0_0/schemas/questionnaireitemenablewhen.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ module.exports = new GraphQLObjectType({
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerDecimal: {
type: new GraphQLNonNull(GraphQLFloat),
type: GraphQLFloat,
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
Expand All @@ -85,7 +85,7 @@ module.exports = new GraphQLObjectType({
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerInteger: {
type: new GraphQLNonNull(GraphQLInt),
type: GraphQLInt,
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
Expand All @@ -95,7 +95,7 @@ module.exports = new GraphQLObjectType({
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerDate: {
type: new GraphQLNonNull(DateScalar),
type: DateScalar,
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
Expand All @@ -105,7 +105,7 @@ module.exports = new GraphQLObjectType({
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerDateTime: {
type: new GraphQLNonNull(DateTimeScalar),
type: DateTimeScalar,
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
Expand All @@ -115,7 +115,7 @@ module.exports = new GraphQLObjectType({
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerTime: {
type: new GraphQLNonNull(TimeScalar),
type: TimeScalar,
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
Expand All @@ -125,23 +125,22 @@ module.exports = new GraphQLObjectType({
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerString: {
type: new GraphQLNonNull(GraphQLString),
type: GraphQLString,
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerCoding: {
type: new GraphQLNonNull(require('./coding.schema.js')),
type: require('./coding.schema.js'),
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerQuantity: {
type: new GraphQLNonNull(require('./quantity.schema.js')),
type: require('./quantity.schema.js'),
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
answerReference: {
type: new GraphQLNonNull(
new GraphQLUnionType({
type: new GraphQLUnionType({
name:
'QuestionnaireitemenableWhenanswerReference_answerReference_Union',
description:
Expand All @@ -153,7 +152,6 @@ module.exports = new GraphQLObjectType({
}
},
}),
),
description:
'A value that the referenced question is tested using the specified operator in order for the item to be enabled.',
},
Expand Down

0 comments on commit f8d0c41

Please sign in to comment.