[COMMAND MENU ITEMS] Create union type for command menu item payload (#19432)
Replace generic JSON scalar with a typed GraphQL union CommandMenuItemPayload (PathNavigationPayload | ObjectMetadataNavigationPayload) for the CommandMenuItem.payload field
This commit is contained in:
+8
-1
@@ -16,7 +16,14 @@ export const COMMAND_MENU_ITEM_FRAGMENT = gql`
|
||||
shortLabel
|
||||
position
|
||||
isPinned
|
||||
payload
|
||||
payload {
|
||||
... on PathCommandMenuItemPayload {
|
||||
path
|
||||
}
|
||||
... on ObjectMetadataCommandMenuItemPayload {
|
||||
objectMetadataItemId
|
||||
}
|
||||
}
|
||||
hotKeys
|
||||
conditionalAvailabilityExpression
|
||||
availabilityType
|
||||
|
||||
Reference in New Issue
Block a user