d07c27a907
Replace generic JSON scalar with a typed GraphQL union CommandMenuItemPayload (PathNavigationPayload | ObjectMetadataNavigationPayload) for the CommandMenuItem.payload field
33 lines
620 B
TypeScript
33 lines
620 B
TypeScript
import { gql } from '@apollo/client';
|
|
|
|
export const COMMAND_MENU_ITEM_FRAGMENT = gql`
|
|
fragment CommandMenuItemFields on CommandMenuItem {
|
|
id
|
|
workflowVersionId
|
|
frontComponentId
|
|
frontComponent {
|
|
id
|
|
name
|
|
isHeadless
|
|
}
|
|
engineComponentKey
|
|
label
|
|
icon
|
|
shortLabel
|
|
position
|
|
isPinned
|
|
payload {
|
|
... on PathCommandMenuItemPayload {
|
|
path
|
|
}
|
|
... on ObjectMetadataCommandMenuItemPayload {
|
|
objectMetadataItemId
|
|
}
|
|
}
|
|
hotKeys
|
|
conditionalAvailabilityExpression
|
|
availabilityType
|
|
availabilityObjectMetadataId
|
|
}
|
|
`;
|