NodeIDPrivate

Annotate a type attribute as its id.

The Node interface will automatically create and resolve GlobalIDs based on the field annotated with NodeID . e.g:

import strawberry
@strawberry.type
class Fruit(Node):
code: NodeID[str]

In this case, code will be used to generate a global ID in the format Fruit:<code> and will be exposed as id: GlobalID! in the Fruit type.