Skip to content

Commit

Permalink
findCatch -> findCatches
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin committed Nov 27, 2023
1 parent acdb970 commit e7eb8c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private fun GQLValue?.toCatchTo(): CatchTo {
}

@ApolloInternal
fun List<GQLDirective>.findCatchs(schema: Schema): List<Catch> {
fun List<GQLDirective>.findCatches(schema: Schema): List<Catch> {
return filter {
schema.originalDirectiveName(it.name) == Schema.CATCH
}.map {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import com.apollographql.apollo3.ast.TransformResult
import com.apollographql.apollo3.ast.VariableUsage
import com.apollographql.apollo3.ast.definitionFromScope
import com.apollographql.apollo3.ast.fieldDefinitions
import com.apollographql.apollo3.ast.findCatchs
import com.apollographql.apollo3.ast.findCatches
import com.apollographql.apollo3.ast.findDeprecationReason
import com.apollographql.apollo3.ast.findNonnull
import com.apollographql.apollo3.ast.findNooeLevels
Expand Down Expand Up @@ -493,7 +493,7 @@ internal class IrOperationsBuilder(
}

override fun merge(fields: List<FieldWithParent>): List<MergedField> {
val defaultCatch = schema.schemaDefinition?.directives?.findCatchs(schema)?.singleOrNull()
val defaultCatch = schema.schemaDefinition?.directives?.findCatches(schema)?.singleOrNull()

return fields.map { fieldWithParent ->
val gqlField = fieldWithParent.gqlField
Expand Down Expand Up @@ -541,7 +541,7 @@ internal class IrOperationsBuilder(
nooes = nooeLevels,
forceOptional = gqlField.directives.optionalValue(schema) == true,
parentType = fieldWithParent.parentType,
catchs = gqlField.directives.findCatchs(schema)
catchs = gqlField.directives.findCatches(schema)
)
}.groupBy {
it.responseName
Expand Down

0 comments on commit e7eb8c7

Please sign in to comment.