(cls, name)
return prefix + ''.join(parts[:1] + [p.title() for p in parts[1:]])
Converts a Python name, ``a_name`` to GraphQL: ``aName``.

        Note that leading underscores (``_``) are preserved.

        >>> BaseItem._to_graphql_name('a_name')
        'aName'
        >>> BaseItem._to_graphql_name('__underscore_prefixed')
        '__underscorePrefixed'
        >>> BaseItem._to_graphql_name('__typename__')
        '__typename'
Converts a Python name, ``a_name`` to GraphQL: ``aName``.
Converts a Python name a_name to GraphQL : aName .
def _to_graphql_name(cls, name):
        '''Converts a Python name, ``a_name`` to GraphQL: ``aName``.

        Note that leading underscores (``_``) are preserved.

        >>> BaseItem._to_graphql_name('a_name')
        'aName'
        >>> BaseItem._to_graphql_name('__underscore_prefixed')
        '__underscorePrefixed'
        >>> BaseItem._to_graphql_name('__typename__')
        '__typename'
        '''
        try:
            return cls._renamed_to_graphql_fields[name]
        except KeyError:
            pass
        prefix = ''
        while name.startswith('_'):
            prefix += '_'
            name = name[1:]
        parts = name.split('_')
        return prefix + ''.join(parts[:1] + [p.title() for p in parts[1:]])
def _to_graphql_name ( cls , name ) : try : return cls . _renamed_to_graphql_fields [ name ] except KeyError : pass prefix = '' while name . startswith ( '_' ) : prefix += '_' name = name [ 1 : ] parts = name . split ( '_' ) return prefix + '' . join ( parts [ : 1 ] + [ p . title ( ) for p in parts [ 1 : ] ] )