protected static function doesFragmentConditionMatch(ExecutionContext $context, $fragment, ObjectType $type)
    {
        $typeCondition = $fragment->get('typeCondition');
        if (!$typeCondition) {
            return TRUE;
        }

        $conditionalType = TypeInfo::typeFromAST($context->schema, $typeCondition);
        if ($conditionalType->getName() === $type->getName()) {
            return TRUE;
        }

        if ($conditionalType instanceof InterfaceType || $conditionalType instanceof UnionType) {
            return $conditionalType->isPossibleType($type);
        }

        return FALSE;
    }