Skip to content

Commit

Permalink
Update doco
Browse files Browse the repository at this point in the history
  • Loading branch information
gnawf committed Dec 17, 2024
1 parent 196867a commit 48566fa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class NadelAssignableTypeValidation internal constructor(
overallType: GraphQLType,
underlyingType: GraphQLType,
): Boolean {
// Note: the (supplied) value comes from the underlying service, and that value needs to fit the (required) overall field's type
return isTypeAssignable(
suppliedType = underlyingType,
requiredType = overallType,
Expand All @@ -25,6 +26,7 @@ class NadelAssignableTypeValidation internal constructor(
overallType: GraphQLType,
underlyingType: GraphQLType,
): Boolean {
// Note: the (supplied) value comes from the user (overall schema) and needs to be assigned to the (required) underlying type
return isTypeAssignable(
suppliedType = overallType,
requiredType = underlyingType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ class NadelFieldValidation internal constructor(
if (underlyingArg == null) {
MissingArgumentOnUnderlying(parent, overallField, underlyingField, overallArg)
} else {
// Note: the value comes from the user (overall schema)
// So we are supplying the overall argument to the underlying argument
val isArgumentTypeAssignable = assignableTypeValidation.isInputTypeAssignable(
overallType = overallArg.type,
underlyingType = underlyingArg.type
Expand Down Expand Up @@ -189,7 +187,6 @@ class NadelFieldValidation internal constructor(
overallField: GraphQLFieldDefinition,
underlyingField: GraphQLFieldDefinition,
): NadelSchemaValidationResult {
// Note: the value comes from the underlying schema, so we are supplying the underlying field to the overall field
val isUnderlyingTypeAssignable = assignableTypeValidation.isOutputTypeAssignable(
overallType = overallField.type,
underlyingType = underlyingField.type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ class NadelVirtualTypeValidation internal constructor(
)
}

// Note: the value comes from the backing field, and that value needs to fit the virtual field
val isOutputTypeAssignable = isOutputTypeAssignable(
backingField = backingField,
virtualField = virtualField,
Expand Down Expand Up @@ -310,6 +309,7 @@ class NadelVirtualTypeValidation internal constructor(
backingField: GraphQLFieldDefinition,
virtualField: GraphQLFieldDefinition,
): Boolean {
// Note: the (supplied) value comes from the backing service, and that value needs to fit the (required) virtual field's type
val suppliedType = backingField.type
val requiredType = virtualField.type

Expand Down

0 comments on commit 48566fa

Please sign in to comment.