In the 2024 edition of the API, equipment options that provide multiple items use the MultipleItemUnion2024 union type. When querying an equipment option of type multiple, the items field will return an array of objects that can be one of the following three types:
CountedReferenceOption2024: A specific quantity of a single piece of equipment (e.g., "2 torches").MoneyOption2024: A specific amount of currency (e.g., "50 gp").ChoiceItemOption2024: A choice from a specific equipment category (e.g., "choose 2 items from the Explorer's Pack category").
To distinguish between these in a GraphQL query, use an inline fragment (... on TypeName) and check the option_type field.
query {
# Example of how to query the union
equipmentOption {
items {
__typename
... on CountedReferenceOption2024 {
option_type
count
of {
name
}
}
... on MoneyOption2024 {
option_type
count
unit
}
... on ChoiceItemOption2024 {
option_type
choice {
choose
from {
equipment_category {
name
}
}
}
}
}
}
}