mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-15 08:12:18 -06:00
15809 Mark unions as nullable in GraphQL where appropriate (#15824)
* 15809 mark unions as nullable where appropriate * 15809 fix tests * 15809 fix tests
This commit is contained in:
@@ -130,7 +130,7 @@ class CableTerminationType(NetBoxObjectType):
|
||||
Annotated["PowerOutletType", strawberry.lazy('dcim.graphql.types')],
|
||||
Annotated["PowerPortType", strawberry.lazy('dcim.graphql.types')],
|
||||
Annotated["RearPortType", strawberry.lazy('dcim.graphql.types')],
|
||||
], strawberry.union("CableTerminationTerminationType")]
|
||||
], strawberry.union("CableTerminationTerminationType")] | None
|
||||
|
||||
|
||||
@strawberry_django.type(
|
||||
@@ -302,7 +302,7 @@ class InventoryItemTemplateType(ComponentTemplateType):
|
||||
Annotated["PowerOutletType", strawberry.lazy('dcim.graphql.types')],
|
||||
Annotated["PowerPortType", strawberry.lazy('dcim.graphql.types')],
|
||||
Annotated["RearPortType", strawberry.lazy('dcim.graphql.types')],
|
||||
], strawberry.union("InventoryItemTemplateComponentType")]
|
||||
], strawberry.union("InventoryItemTemplateComponentType")] | None
|
||||
|
||||
|
||||
@strawberry_django.type(
|
||||
@@ -431,7 +431,7 @@ class InventoryItemType(ComponentType):
|
||||
Annotated["PowerOutletType", strawberry.lazy('dcim.graphql.types')],
|
||||
Annotated["PowerPortType", strawberry.lazy('dcim.graphql.types')],
|
||||
Annotated["RearPortType", strawberry.lazy('dcim.graphql.types')],
|
||||
], strawberry.union("InventoryItemComponentType")]
|
||||
], strawberry.union("InventoryItemComponentType")] | None
|
||||
|
||||
|
||||
@strawberry_django.type(
|
||||
|
||||
Reference in New Issue
Block a user