Skip to content

Commit

Permalink
Optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostdogpr committed Jun 1, 2024
1 parent 76e4e9a commit 94f5e15
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions core/src/main/scala/caliban/execution/Executor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -386,20 +386,20 @@ object Executor {
case wrapper :: tail =>
val q =
if (isPure && !wrapper.wrapPureValues) query
else
wrapper
.wrap(query, fieldInfo)
.mapErrorCause(e =>
effectfulExecutionError(
PathValue.Key(fieldInfo.name) :: fieldInfo.path,
Some(fieldInfo.details.locationInfo),
e
)
)

else wrapper.wrap(query, fieldInfo)
loop(q, tail)
}
loop(query, fieldWrappers)

if ((isPure && !wrapPureValues) || (fieldWrappers eq Nil)) query
else {
loop(query, fieldWrappers).mapErrorCause(e =>
effectfulExecutionError(
PathValue.Key(fieldInfo.name) :: fieldInfo.path,
Some(fieldInfo.details.locationInfo),
e
)
)
}
}

def objectFieldQuery(step: ReducedStep[R], info: FieldInfo, isPure: Boolean = false) = {
Expand Down

0 comments on commit 94f5e15

Please sign in to comment.