| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974 |
- import gql from 'graphql-tag';
- import {
- ADMINISTRATOR_FRAGMENT,
- ASSET_FRAGMENT,
- CHANNEL_FRAGMENT,
- COLLECTION_FRAGMENT,
- COUNTRY_FRAGMENT,
- CURRENT_USER_FRAGMENT,
- CUSTOMER_FRAGMENT,
- CUSTOMER_GROUP_FRAGMENT,
- FACET_WITH_VALUES_FRAGMENT,
- FULFILLMENT_FRAGMENT,
- GLOBAL_SETTINGS_FRAGMENT,
- ORDER_FRAGMENT,
- ORDER_WITH_LINES_FRAGMENT,
- PAYMENT_FRAGMENT,
- PRODUCT_OPTION_GROUP_FRAGMENT,
- PRODUCT_VARIANT_FRAGMENT,
- PRODUCT_WITH_OPTIONS_FRAGMENT,
- PRODUCT_WITH_VARIANTS_FRAGMENT,
- PROMOTION_FRAGMENT,
- ROLE_FRAGMENT,
- SHIPPING_METHOD_FRAGMENT,
- TAX_RATE_FRAGMENT,
- VARIANT_WITH_STOCK_FRAGMENT,
- } from './fragments';
- export const CREATE_ADMINISTRATOR = gql`
- mutation CreateAdministrator($input: CreateAdministratorInput!) {
- createAdministrator(input: $input) {
- ...Administrator
- }
- }
- ${ADMINISTRATOR_FRAGMENT}
- `;
- export const UPDATE_PRODUCT = gql`
- mutation UpdateProduct($input: UpdateProductInput!) {
- updateProduct(input: $input) {
- ...ProductWithVariants
- }
- }
- ${PRODUCT_WITH_VARIANTS_FRAGMENT}
- `;
- export const CREATE_PRODUCT = gql`
- mutation CreateProduct($input: CreateProductInput!) {
- createProduct(input: $input) {
- ...ProductWithVariants
- }
- }
- ${PRODUCT_WITH_VARIANTS_FRAGMENT}
- `;
- export const GET_PRODUCT_WITH_VARIANTS = gql`
- query GetProductWithVariants($id: ID, $slug: String) {
- product(slug: $slug, id: $id) {
- ...ProductWithVariants
- }
- }
- ${PRODUCT_WITH_VARIANTS_FRAGMENT}
- `;
- export const GET_PRODUCT_LIST = gql`
- query GetProductList($options: ProductListOptions) {
- products(options: $options) {
- items {
- id
- languageCode
- name
- slug
- featuredAsset {
- id
- preview
- }
- }
- totalItems
- }
- }
- `;
- export const CREATE_PRODUCT_VARIANTS = gql`
- mutation CreateProductVariants($input: [CreateProductVariantInput!]!) {
- createProductVariants(input: $input) {
- ...ProductVariant
- }
- }
- ${PRODUCT_VARIANT_FRAGMENT}
- `;
- export const UPDATE_PRODUCT_VARIANTS = gql`
- mutation UpdateProductVariants($input: [UpdateProductVariantInput!]!) {
- updateProductVariants(input: $input) {
- ...ProductVariant
- }
- }
- ${PRODUCT_VARIANT_FRAGMENT}
- `;
- export const UPDATE_TAX_RATE = gql`
- mutation UpdateTaxRate($input: UpdateTaxRateInput!) {
- updateTaxRate(input: $input) {
- ...TaxRate
- }
- }
- ${TAX_RATE_FRAGMENT}
- `;
- export const CREATE_FACET = gql`
- mutation CreateFacet($input: CreateFacetInput!) {
- createFacet(input: $input) {
- ...FacetWithValues
- }
- }
- ${FACET_WITH_VALUES_FRAGMENT}
- `;
- export const UPDATE_FACET = gql`
- mutation UpdateFacet($input: UpdateFacetInput!) {
- updateFacet(input: $input) {
- ...FacetWithValues
- }
- }
- ${FACET_WITH_VALUES_FRAGMENT}
- `;
- export const GET_CUSTOMER_LIST = gql`
- query GetCustomerList($options: CustomerListOptions) {
- customers(options: $options) {
- items {
- id
- title
- firstName
- lastName
- emailAddress
- phoneNumber
- user {
- id
- verified
- }
- }
- totalItems
- }
- }
- `;
- export const GET_ASSET_LIST = gql`
- query GetAssetList($options: AssetListOptions) {
- assets(options: $options) {
- items {
- ...Asset
- }
- totalItems
- }
- }
- ${ASSET_FRAGMENT}
- `;
- export const CREATE_ROLE = gql`
- mutation CreateRole($input: CreateRoleInput!) {
- createRole(input: $input) {
- ...Role
- }
- }
- ${ROLE_FRAGMENT}
- `;
- export const CREATE_COLLECTION = gql`
- mutation CreateCollection($input: CreateCollectionInput!) {
- createCollection(input: $input) {
- ...Collection
- }
- }
- ${COLLECTION_FRAGMENT}
- `;
- export const UPDATE_COLLECTION = gql`
- mutation UpdateCollection($input: UpdateCollectionInput!) {
- updateCollection(input: $input) {
- ...Collection
- }
- }
- ${COLLECTION_FRAGMENT}
- `;
- export const GET_CUSTOMER = gql`
- query GetCustomer($id: ID!, $orderListOptions: OrderListOptions) {
- customer(id: $id) {
- ...Customer
- orders(options: $orderListOptions) {
- items {
- id
- code
- state
- total
- currencyCode
- updatedAt
- }
- totalItems
- }
- }
- }
- ${CUSTOMER_FRAGMENT}
- `;
- export const ATTEMPT_LOGIN = gql`
- mutation AttemptLogin($username: String!, $password: String!, $rememberMe: Boolean) {
- login(username: $username, password: $password, rememberMe: $rememberMe) {
- ...CurrentUser
- }
- }
- ${CURRENT_USER_FRAGMENT}
- `;
- export const GET_COUNTRY_LIST = gql`
- query GetCountryList($options: CountryListOptions) {
- countries(options: $options) {
- items {
- id
- code
- name
- enabled
- }
- totalItems
- }
- }
- `;
- export const UPDATE_COUNTRY = gql`
- mutation UpdateCountry($input: UpdateCountryInput!) {
- updateCountry(input: $input) {
- ...Country
- }
- }
- ${COUNTRY_FRAGMENT}
- `;
- export const GET_FACET_LIST = gql`
- query GetFacetList($options: FacetListOptions) {
- facets(options: $options) {
- items {
- ...FacetWithValues
- }
- totalItems
- }
- }
- ${FACET_WITH_VALUES_FRAGMENT}
- `;
- export const GET_FACET_LIST_SIMPLE = gql`
- query GetFacetListSimple($options: FacetListOptions) {
- facets(options: $options) {
- items {
- id
- name
- }
- totalItems
- }
- }
- `;
- export const DELETE_PRODUCT = gql`
- mutation DeleteProduct($id: ID!) {
- deleteProduct(id: $id) {
- result
- }
- }
- `;
- export const GET_PRODUCT_SIMPLE = gql`
- query GetProductSimple($id: ID, $slug: String) {
- product(slug: $slug, id: $id) {
- id
- slug
- }
- }
- `;
- export const GET_STOCK_MOVEMENT = gql`
- query GetStockMovement($id: ID!) {
- product(id: $id) {
- id
- variants {
- ...VariantWithStock
- }
- }
- }
- ${VARIANT_WITH_STOCK_FRAGMENT}
- `;
- export const GET_RUNNING_JOBS = gql`
- query GetRunningJobs($options: JobListOptions) {
- jobs(options: $options) {
- items {
- id
- queueName
- state
- isSettled
- duration
- }
- totalItems
- }
- }
- `;
- export const CREATE_PROMOTION = gql`
- mutation CreatePromotion($input: CreatePromotionInput!) {
- createPromotion(input: $input) {
- ...Promotion
- ... on ErrorResult {
- errorCode
- message
- }
- }
- }
- ${PROMOTION_FRAGMENT}
- `;
- export const ME = gql`
- query Me {
- me {
- ...CurrentUser
- }
- }
- ${CURRENT_USER_FRAGMENT}
- `;
- export const CREATE_CHANNEL = gql`
- mutation CreateChannel($input: CreateChannelInput!) {
- createChannel(input: $input) {
- ...Channel
- ... on LanguageNotAvailableError {
- errorCode
- message
- languageCode
- }
- }
- }
- ${CHANNEL_FRAGMENT}
- `;
- export const DELETE_PRODUCT_VARIANT = gql`
- mutation DeleteProductVariant($id: ID!) {
- deleteProductVariant(id: $id) {
- result
- message
- }
- }
- `;
- export const ASSIGN_PRODUCT_TO_CHANNEL = gql`
- mutation AssignProductsToChannel($input: AssignProductsToChannelInput!) {
- assignProductsToChannel(input: $input) {
- ...ProductWithVariants
- }
- }
- ${PRODUCT_WITH_VARIANTS_FRAGMENT}
- `;
- export const REMOVE_PRODUCT_FROM_CHANNEL = gql`
- mutation RemoveProductsFromChannel($input: RemoveProductsFromChannelInput!) {
- removeProductsFromChannel(input: $input) {
- ...ProductWithVariants
- }
- }
- ${PRODUCT_WITH_VARIANTS_FRAGMENT}
- `;
- export const ASSIGN_PRODUCTVARIANT_TO_CHANNEL = gql`
- mutation AssignProductVariantsToChannel($input: AssignProductVariantsToChannelInput!) {
- assignProductVariantsToChannel(input: $input) {
- ...ProductVariant
- }
- }
- ${PRODUCT_VARIANT_FRAGMENT}
- `;
- export const REMOVE_PRODUCTVARIANT_FROM_CHANNEL = gql`
- mutation RemoveProductVariantsFromChannel($input: RemoveProductVariantsFromChannelInput!) {
- removeProductVariantsFromChannel(input: $input) {
- ...ProductVariant
- }
- }
- ${PRODUCT_VARIANT_FRAGMENT}
- `;
- export const UPDATE_ASSET = gql`
- mutation UpdateAsset($input: UpdateAssetInput!) {
- updateAsset(input: $input) {
- ...Asset
- ... on Asset {
- tags {
- id
- value
- }
- focalPoint {
- x
- y
- }
- }
- }
- }
- ${ASSET_FRAGMENT}
- `;
- export const DELETE_ASSET = gql`
- mutation DeleteAsset($input: DeleteAssetInput!) {
- deleteAsset(input: $input) {
- result
- message
- }
- }
- `;
- export const UPDATE_CHANNEL = gql`
- mutation UpdateChannel($input: UpdateChannelInput!) {
- updateChannel(input: $input) {
- ...Channel
- ... on LanguageNotAvailableError {
- errorCode
- message
- languageCode
- }
- }
- }
- ${CHANNEL_FRAGMENT}
- `;
- export const GET_CUSTOMER_HISTORY = gql`
- query GetCustomerHistory($id: ID!, $options: HistoryEntryListOptions) {
- customer(id: $id) {
- id
- history(options: $options) {
- totalItems
- items {
- id
- administrator {
- id
- }
- type
- data
- }
- }
- }
- }
- `;
- export const GET_ORDER = gql`
- query GetOrder($id: ID!) {
- order(id: $id) {
- ...OrderWithLines
- }
- }
- ${ORDER_WITH_LINES_FRAGMENT}
- `;
- export const CREATE_CUSTOMER_GROUP = gql`
- mutation CreateCustomerGroup($input: CreateCustomerGroupInput!) {
- createCustomerGroup(input: $input) {
- ...CustomerGroup
- }
- }
- ${CUSTOMER_GROUP_FRAGMENT}
- `;
- export const REMOVE_CUSTOMERS_FROM_GROUP = gql`
- mutation RemoveCustomersFromGroup($groupId: ID!, $customerIds: [ID!]!) {
- removeCustomersFromGroup(customerGroupId: $groupId, customerIds: $customerIds) {
- ...CustomerGroup
- }
- }
- ${CUSTOMER_GROUP_FRAGMENT}
- `;
- export const CREATE_FULFILLMENT = gql`
- mutation CreateFulfillment($input: FulfillOrderInput!) {
- addFulfillmentToOrder(input: $input) {
- ...Fulfillment
- ... on ErrorResult {
- errorCode
- message
- }
- ... on CreateFulfillmentError {
- fulfillmentHandlerError
- }
- }
- }
- ${FULFILLMENT_FRAGMENT}
- `;
- export const TRANSIT_FULFILLMENT = gql`
- mutation TransitFulfillment($id: ID!, $state: String!) {
- transitionFulfillmentToState(id: $id, state: $state) {
- ...Fulfillment
- ... on FulfillmentStateTransitionError {
- errorCode
- message
- transitionError
- fromState
- toState
- }
- }
- }
- ${FULFILLMENT_FRAGMENT}
- `;
- export const GET_ORDER_FULFILLMENTS = gql`
- query GetOrderFulfillments($id: ID!) {
- order(id: $id) {
- id
- state
- fulfillments {
- id
- state
- nextStates
- method
- summary {
- orderLine {
- id
- }
- quantity
- }
- }
- }
- }
- `;
- export const GET_ORDERS_LIST = gql`
- query GetOrderList($options: OrderListOptions) {
- orders(options: $options) {
- items {
- ...Order
- }
- totalItems
- }
- }
- ${ORDER_FRAGMENT}
- `;
- export const CREATE_ADDRESS = gql`
- mutation CreateAddress($id: ID!, $input: CreateAddressInput!) {
- createCustomerAddress(customerId: $id, input: $input) {
- id
- fullName
- company
- streetLine1
- streetLine2
- city
- province
- postalCode
- country {
- code
- name
- }
- phoneNumber
- defaultShippingAddress
- defaultBillingAddress
- }
- }
- `;
- export const UPDATE_ADDRESS = gql`
- mutation UpdateAddress($input: UpdateAddressInput!) {
- updateCustomerAddress(input: $input) {
- id
- defaultShippingAddress
- defaultBillingAddress
- country {
- code
- name
- }
- }
- }
- `;
- export const CREATE_CUSTOMER = gql`
- mutation CreateCustomer($input: CreateCustomerInput!, $password: String) {
- createCustomer(input: $input, password: $password) {
- ...Customer
- ... on ErrorResult {
- errorCode
- message
- }
- }
- }
- ${CUSTOMER_FRAGMENT}
- `;
- export const UPDATE_CUSTOMER = gql`
- mutation UpdateCustomer($input: UpdateCustomerInput!) {
- updateCustomer(input: $input) {
- ...Customer
- ... on ErrorResult {
- errorCode
- message
- }
- }
- }
- ${CUSTOMER_FRAGMENT}
- `;
- export const DELETE_CUSTOMER = gql`
- mutation DeleteCustomer($id: ID!) {
- deleteCustomer(id: $id) {
- result
- }
- }
- `;
- export const UPDATE_CUSTOMER_NOTE = gql`
- mutation UpdateCustomerNote($input: UpdateCustomerNoteInput!) {
- updateCustomerNote(input: $input) {
- id
- data
- isPublic
- }
- }
- `;
- export const DELETE_CUSTOMER_NOTE = gql`
- mutation DeleteCustomerNote($id: ID!) {
- deleteCustomerNote(id: $id) {
- result
- message
- }
- }
- `;
- export const UPDATE_CUSTOMER_GROUP = gql`
- mutation UpdateCustomerGroup($input: UpdateCustomerGroupInput!) {
- updateCustomerGroup(input: $input) {
- ...CustomerGroup
- }
- }
- ${CUSTOMER_GROUP_FRAGMENT}
- `;
- export const DELETE_CUSTOMER_GROUP = gql`
- mutation DeleteCustomerGroup($id: ID!) {
- deleteCustomerGroup(id: $id) {
- result
- message
- }
- }
- `;
- export const GET_CUSTOMER_GROUPS = gql`
- query GetCustomerGroups($options: CustomerGroupListOptions) {
- customerGroups(options: $options) {
- items {
- id
- name
- }
- totalItems
- }
- }
- `;
- export const GET_CUSTOMER_GROUP = gql`
- query GetCustomerGroup($id: ID!, $options: CustomerListOptions) {
- customerGroup(id: $id) {
- id
- name
- customers(options: $options) {
- items {
- id
- }
- totalItems
- }
- }
- }
- `;
- export const ADD_CUSTOMERS_TO_GROUP = gql`
- mutation AddCustomersToGroup($groupId: ID!, $customerIds: [ID!]!) {
- addCustomersToGroup(customerGroupId: $groupId, customerIds: $customerIds) {
- ...CustomerGroup
- }
- }
- ${CUSTOMER_GROUP_FRAGMENT}
- `;
- export const GET_CUSTOMER_WITH_GROUPS = gql`
- query GetCustomerWithGroups($id: ID!) {
- customer(id: $id) {
- id
- groups {
- id
- name
- }
- }
- }
- `;
- export const ADMIN_TRANSITION_TO_STATE = gql`
- mutation AdminTransition($id: ID!, $state: String!) {
- transitionOrderToState(id: $id, state: $state) {
- ...Order
- ... on OrderStateTransitionError {
- errorCode
- message
- transitionError
- fromState
- toState
- }
- }
- }
- ${ORDER_FRAGMENT}
- `;
- export const CANCEL_ORDER = gql`
- mutation CancelOrder($input: CancelOrderInput!) {
- cancelOrder(input: $input) {
- ...CanceledOrder
- ... on ErrorResult {
- errorCode
- message
- }
- }
- }
- fragment CanceledOrder on Order {
- id
- state
- lines {
- quantity
- items {
- id
- cancelled
- }
- }
- }
- `;
- export const UPDATE_GLOBAL_SETTINGS = gql`
- mutation UpdateGlobalSettings($input: UpdateGlobalSettingsInput!) {
- updateGlobalSettings(input: $input) {
- ...GlobalSettings
- ... on ErrorResult {
- errorCode
- message
- }
- }
- }
- ${GLOBAL_SETTINGS_FRAGMENT}
- `;
- export const UPDATE_ROLE = gql`
- mutation UpdateRole($input: UpdateRoleInput!) {
- updateRole(input: $input) {
- ...Role
- }
- }
- ${ROLE_FRAGMENT}
- `;
- export const GET_PRODUCTS_WITH_VARIANT_PRICES = gql`
- query GetProductsWithVariantPrices {
- products {
- items {
- id
- slug
- variants {
- id
- price
- priceWithTax
- sku
- facetValues {
- id
- code
- }
- }
- }
- }
- }
- `;
- export const CREATE_PRODUCT_OPTION_GROUP = gql`
- mutation CreateProductOptionGroup($input: CreateProductOptionGroupInput!) {
- createProductOptionGroup(input: $input) {
- ...ProductOptionGroup
- }
- }
- ${PRODUCT_OPTION_GROUP_FRAGMENT}
- `;
- export const ADD_OPTION_GROUP_TO_PRODUCT = gql`
- mutation AddOptionGroupToProduct($productId: ID!, $optionGroupId: ID!) {
- addOptionGroupToProduct(productId: $productId, optionGroupId: $optionGroupId) {
- ...ProductWithOptions
- }
- }
- ${PRODUCT_WITH_OPTIONS_FRAGMENT}
- `;
- export const CREATE_SHIPPING_METHOD = gql`
- mutation CreateShippingMethod($input: CreateShippingMethodInput!) {
- createShippingMethod(input: $input) {
- ...ShippingMethod
- }
- }
- ${SHIPPING_METHOD_FRAGMENT}
- `;
- export const SETTLE_PAYMENT = gql`
- mutation SettlePayment($id: ID!) {
- settlePayment(id: $id) {
- ...Payment
- ... on ErrorResult {
- errorCode
- message
- }
- ... on SettlePaymentError {
- paymentErrorMessage
- }
- }
- }
- ${PAYMENT_FRAGMENT}
- `;
- export const GET_ORDER_HISTORY = gql`
- query GetOrderHistory($id: ID!, $options: HistoryEntryListOptions) {
- order(id: $id) {
- id
- history(options: $options) {
- totalItems
- items {
- id
- type
- administrator {
- id
- }
- data
- }
- }
- }
- }
- `;
- export const UPDATE_SHIPPING_METHOD = gql`
- mutation UpdateShippingMethod($input: UpdateShippingMethodInput!) {
- updateShippingMethod(input: $input) {
- ...ShippingMethod
- }
- }
- ${SHIPPING_METHOD_FRAGMENT}
- `;
- export const GET_ASSET = gql`
- query GetAsset($id: ID!) {
- asset(id: $id) {
- ...Asset
- width
- height
- }
- }
- ${ASSET_FRAGMENT}
- `;
- export const GET_ASSET_FRAGMENT_FIRST = gql`
- fragment AssetFragFirst on Asset {
- id
- preview
- }
- query GetAssetFragmentFirst($id: ID!) {
- asset(id: $id) {
- ...AssetFragFirst
- }
- }
- `;
- export const CREATE_ASSETS = gql`
- mutation CreateAssets($input: [CreateAssetInput!]!) {
- createAssets(input: $input) {
- ...Asset
- ... on Asset {
- focalPoint {
- x
- y
- }
- tags {
- id
- value
- }
- }
- ... on MimeTypeError {
- message
- fileName
- mimeType
- }
- }
- }
- ${ASSET_FRAGMENT}
- `;
- export const DELETE_SHIPPING_METHOD = gql`
- mutation DeleteShippingMethod($id: ID!) {
- deleteShippingMethod(id: $id) {
- result
- message
- }
- }
- `;
- export const ASSIGN_PROMOTIONS_TO_CHANNEL = gql`
- mutation AssignPromotionToChannel($input: AssignPromotionsToChannelInput!) {
- assignPromotionsToChannel(input: $input) {
- id
- name
- }
- }
- `;
- export const REMOVE_PROMOTIONS_FROM_CHANNEL = gql`
- mutation RemovePromotionFromChannel($input: RemovePromotionsFromChannelInput!) {
- removePromotionsFromChannel(input: $input) {
- id
- name
- }
- }
- `;
- export const GET_TAX_RATES_LIST = gql`
- query GetTaxRates($options: TaxRateListOptions) {
- taxRates(options: $options) {
- items {
- ...TaxRate
- }
- totalItems
- }
- }
- ${TAX_RATE_FRAGMENT}
- `;
- export const GET_SHIPPING_METHOD_LIST = gql`
- query GetShippingMethodList {
- shippingMethods {
- items {
- ...ShippingMethod
- }
- totalItems
- }
- }
- ${SHIPPING_METHOD_FRAGMENT}
- `;
- export const GET_COLLECTIONS = gql`
- query GetCollections {
- collections {
- items {
- id
- name
- position
- parent {
- id
- name
- }
- }
- }
- }
- `;
- export const TRANSITION_PAYMENT_TO_STATE = gql`
- mutation TransitionPaymentToState($id: ID!, $state: String!) {
- transitionPaymentToState(id: $id, state: $state) {
- ...Payment
- ... on ErrorResult {
- errorCode
- message
- }
- ... on PaymentStateTransitionError {
- transitionError
- }
- }
- }
- ${PAYMENT_FRAGMENT}
- `;
|