Skip to content

Commit

Permalink
fix: Rename DefaultValue -> DefaultValueValidator
Browse files Browse the repository at this point in the history
  • Loading branch information
frekw committed Sep 15, 2021
1 parent afdb356 commit 945e1e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import caliban.introspection.adt.__TypeKind._
import caliban.parsing.Parser
import zio.IO

object DefaultValue {
object DefaultValueValidator {
def validateDefaultValue(field: __InputValue, errorContext: String): IO[ValidationError, Unit] =
IO.whenCase(field.defaultValue) { case Some(v) =>
for {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/caliban/validation/Validator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ object Validator {
private[caliban] def validateInputValue(inputValue: __InputValue, errorContext: String): IO[ValidationError, Unit] = {
val fieldContext = s"InputValue '${inputValue.name}' of $errorContext"
for {
_ <- DefaultValue.validateDefaultValue(inputValue, fieldContext)
_ <- DefaultValueValidator.validateDefaultValue(inputValue, fieldContext)
_ <- doesNotStartWithUnderscore(inputValue, fieldContext)
_ <- onlyInputType(inputValue.`type`(), fieldContext)
} yield ()
Expand Down

0 comments on commit 945e1e4

Please sign in to comment.