public function handleField(FieldValue $value, Closure $next): FieldValue
    {
        $resolver = $value->getResolver();

        return $next(
            $value->setResolver(
                function (Model $parent, array $args, GraphQLContext $context, ResolveInfo $resolveInfo) use ($resolver): Deferred {
                    $loader = BatchLoader::instance(
                        RelationBatchLoader::class,
                        $resolveInfo->path,
                        [
                            'relationName' => $this->directiveArgValue('relation', $this->definitionNode->name->value),
                            'args' => $args,
                            'scopes' => $this->directiveArgValue('scopes', []),
                            'resolveInfo' => $resolveInfo,
                        ]
                    );

                    return new Deferred(function () use ($loader, $resolver, $parent, $args, $context, $resolveInfo) {
                        return $loader
                            ->load(
                                $parent->getKey(),
                                ['parent' => $parent]
                            )->then(
                                function () use ($resolver, $parent, $args, $context, $resolveInfo) {
                                    return $resolver($parent, $args, $context, $resolveInfo);
                                }
                            );
                    });
                }
            )
        );
    }