29 October 2024
B2BOrdersGraphQL
You can now extend the ApprovalRule resource with Custom Fields. This enhancement allows you to store custom data within your Approval Rule to better meet specific business requirements.
Changes:
- [API] Added optional
customfield to the ApprovalRule type. - [API] Added Set Custom Type and Set CustomField update actions to Approval Rules.
- [API] Added
approval-ruleto CustomFieldReferenceValue enum. - [API] Added
approval-ruleto ResourceTypeId enum. - [GraphQL API] Added the following types to the GraphQL schema:
SetApprovalRuleCustomField,SetApprovalRuleCustomType. - [GraphQL API] Changed the
ApprovalRuleUpdateActiontype:- Input field
setCustomFieldwas added toApprovalRuleUpdateActiontype - Input field
setCustomTypewas added toApprovalRuleUpdateActiontype
- Input field
- [GraphQL API] Changed the
ApprovalRuletype:- Added the
customfield to theApprovalRuletype.
- Added the
The following changes were introduced in terms of GraphQL SDL:
extend type ApprovalRule {
custom: CustomFieldsType
}
extend input ApprovalRuleUpdateAction {
setCustomField: SetApprovalRuleCustomField
setCustomType: SetApprovalRuleCustomType
}
input SetApprovalRuleCustomField {
name: String!
value: String
}
input SetApprovalRuleCustomType {
fields: [CustomFieldInput!]
type: ResourceIdentifierInput
typeKey: String
typeId: String
}