Unable to add new line item to existing order.

Solved
Highlighted
Excursionist
20 0 4

As in title. Try to use graphQl API using this mutation https://help.shopify.com/en/api/graphql-admin-api/reference/mutation/ordereditaddvariant this error ...Error: Field 'orderEditAddVariant' doesn't exist on type 'Mutation'` seems that something is missing. 

0 Likes
Highlighted
Shopify Partner
1781 211 370

Can you share the exact GraphQL query you are sending the to graphql endpoint, and also the endpoint's URL.

Sergiu Svinarciuc | CTO @ visely.io
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!
- To learn more about the awesome stuff we do head over to visely.io or our blog
0 Likes
Highlighted
Excursionist
20 0 4

Anything related to order editing. Im even unable to start order editing by orderEditingBegin mutation. Error is the same 

 

`mutation orderEditBegin{
  orderEditBegin(id: some_order_id) {
    calculatedOrder {
      id
    }
    userErrors {
      field
      message
    }
  }
}`;
 
throws Field 'orderEditBegin' doesn't exist on type 'Mutation' 
 
Im using the shopify-api-node npm package so i dont care what is the url by myself. But i see that url is proper http://greg-test-5.myshopify.com/admin/api/graphql.json so it is not fault of library i use. 
0 Likes
Highlighted
Shopify Staff
Shopify Staff
55 4 27

This is an accepted solution.

Hey greg12!

 

Can you try specifying an API version in that URL?

If you don't specify a version, you'll be served the oldest currently supported version, which is 2019-04.

 

Toggling through the version selector at the top of the orderEditBegin mutation docs, I can see that this mutation doesn't exist in the schema until 2020-01.

 

Can you swap your URL to http://greg-test-5.myshopify.com/admin/api/2020-01/graphql.json

1 Like