docarray.array.mixins.strawberry module#

class docarray.array.mixins.strawberry.StrawberryMixin[source]#

Bases: object

to_strawberry_type()[source]#

Convert a DocumentArray object into a Pydantic model.

Return type

List[ForwardRef]

classmethod from_strawberry_type(model)[source]#

Convert a list of Strawberry into DocumentArray

Parameters

model (List[ForwardRef]) – the list of strawberry type objects that represents a DocumentArray

Return type

T

Returns

a DocumentArray