protected function shouldDefer(TypeNode $fieldType, ResolveInfo $resolveInfo): bool
    {
        if (strtolower($resolveInfo->operation->operation) === 'mutation') {
            return false;
        }

        foreach ($resolveInfo->fieldNodes as $fieldNode) {
            $deferDirective = ASTHelper::directiveDefinition($fieldNode, 'defer');

            if (! $deferDirective) {
                return false;
            }

            if (! ASTHelper::directiveArgValue($deferDirective, 'if', true)) {
                return false;
            }

            $skipDirective = ASTHelper::directiveDefinition($fieldNode, 'skip');
            $includeDirective = ASTHelper::directiveDefinition($fieldNode, 'include');

            $shouldSkip = $skipDirective
                ? ASTHelper::directiveArgValue($skipDirective, 'if', false)
                : false;
            $shouldInclude = $includeDirective
                ? ASTHelper::directiveArgValue($includeDirective, 'if', false)
                : false;

            if ($shouldSkip || $shouldInclude) {
                return false;
            }
        }

        if ($fieldType instanceof NonNullTypeNode) {
            throw new ParseClientException('The @defer directive cannot be placed on a Non-Nullable field.');
        }

        return true;
    }