Skip to content

Instantly share code, notes, and snippets.

@OlegIlyenko
Last active October 25, 2019 03:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save OlegIlyenko/048244aa1adac27b7e4886f920529037 to your computer and use it in GitHub Desktop.
Save OlegIlyenko/048244aa1adac27b7e4886f920529037 to your computer and use it in GitHub Desktop.
extend type Mutation {
createDiscountCode(draft: DiscountCodeDraft!): DiscountCode
updateDiscountCode(
id: String!,
version: Long!,
actions: [DiscountCodeUpdateAction!]!): DiscountCode
deleteDiscountCode(id: String!, version: Long!): DiscountCode
}
input DiscountCodeDraft {
code: String!
name: [LocalizedStringInput!]
description: [LocalizedStringInput!]
cartDiscounts: [ReferenceInput!]!
isActive: Boolean = true
custom: CustomFieldsDraft
# ...
}
input CustomFieldsDraft {
typeId: String
typeKey: String
type: ResourceIdentifierInput
fields: [CustomFieldInput!]
}
input LocalizedStringInput {
locale: Locale!
value: String!
}
input ReferenceInput {
typeId: String!
id: String!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment