Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpdaniels committed Jan 18, 2020
1 parent 26e0e92 commit 7883c7f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions core/src/main/scala/caliban/validation/Validator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ object Validator {
F(op.selectionSet, fragments, variables, operation.opType, document.sourceMapper),
op.operationType,
op.variableDefinitions
)
)
)
}
}
Expand Down Expand Up @@ -243,7 +243,7 @@ object Validator {
"Variables are scoped on a per‐operation basis. That means that any variable used within the context of an operation must be defined at the top level of that operation"
)
)
)
)
) *> IO.foreach(op.variableDefinitions)(
v =>
IO.when(!variableUsages.contains(v.name))(
Expand All @@ -253,9 +253,9 @@ object Validator {
"All variables defined by an operation must be used in that operation or a fragment transitively included by that operation. Unused variables cause a validation error."
)
)
)
)
)
}
}
)
.unit

Expand Down Expand Up @@ -385,7 +385,7 @@ object Validator {
ValidationError(
s"Field '${field.name}' does not exist on type '${Rendering.renderTypeName(currentType)}'.",
"The target field of a field selection must be defined on the scoped type of the selection set. There are no limitations on alias names."
)
)
)
.flatMap { f =>
validateFields(context, field.selectionSet, Types.innerType(f.`type`())) *>
Expand Down Expand Up @@ -417,7 +417,7 @@ object Validator {
"Arguments can be required. An argument is required if the argument type is non‐null and does not have a default value. Otherwise, the argument is optional."
)
)
)
)
)

private def validateInputValues(inputValue: __InputValue, argValue: InputValue): IO[ValidationError, Unit] = {
Expand Down Expand Up @@ -452,7 +452,7 @@ object Validator {
"Input object fields may be required. Much like a field may have required arguments, an input object may have required fields. An input field is required if it has a non‐null type and does not have a default value. Otherwise, the input object field is optional."
)
)
)
)
)
.unit
case _ => IO.unit
Expand Down

0 comments on commit 7883c7f

Please sign in to comment.