strawberry.relay.to_base64

Encode the type name and node id to a base64 string.

Returns:

A GlobalID, which is a string resulting from base64 encoding :.

Signature:

def to_base64(type_: str | type | StrawberryObjectDefinition, node_id: Any) -> str:
...

Parameters:

  1. type_:

    The GraphQL type, type definition or type name.

    Type
    str | type | StrawberryObjectDefinition
  2. node_id:

    The node id itself

    Type
    Any