merge_types

Merge multiple Strawberry types into one.

For example, given two queries A and B , one can merge them into a super type as follows:

merge_types("SuperQuery", (B, A))

This is essentially the same as:

class SuperQuery(B, A):
...

Signature:

def merge_types(name: str, types: Tuple[type, ...]) -> type:
...

Parameters:

  1. name:

    Type
    str
  2. types:

    Type
    Tuple[type, ...]