from typing import List


def get_all_wildcard_queries(string: str, wildcard: str = '*') -> List[str]:
    """
        This method computes all possible wildcard queries matching given
        string.

            :Example:

            .. code-block:: python

                "a" -> ['a', '*', '*a*', 'a*', '*a']
                "ab" -> ['ab', '*', '*a*', 'a*', '*b', '*b*', '*ab*', 'ab*', '*ab']

        See unit tests for more examples.

        :param string: string for which to obtain queries
        :param wildcard: wildcard char in query. Default set to '*'
        :returns: list of queries
    """
    # Add the string and wildcard char as default queries
    queries = {string: True, wildcard: True}

    # Compute other queries using n-grams
    length = len(string)
    for n_gram in range(length):
        # Compute N-grams
        size = length - n_gram
        span = n_gram + 1
        queries[wildcard + string[:span] + wildcard] = True
        queries[string[:span] + wildcard] = True
        for i in range(1, size - 1):
            queries[wildcard + string[i:i + span] + wildcard] = True
        queries[wildcard + string[size - 1:size - 1 + span]] = True
        queries[wildcard + string[size - 1:size - 1 + span] + wildcard] = True

    return list(queries.keys())