Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.
Solved

"invalid id" Issue with fulfillmentServiceDelete Mutation

guest4
Shopify Partner
79 5 19

Issue

It seems that there are two different Admin API GraphQL Ids for Fulfillment Services. Attempting to delete a Fulfillment Service using one of the two ids yields an error message that reads "invalid id".

 

Solution

If your Admin API GraphQL Id has the string ApiFulfillmentService in it, then replace that string with the string FulfillmentService.

 

Example

If given gid://shopify/ApiFulfillmentService/1234567, then it should be changed to gid://shopify/FulfillmentService/1234567.

 

Note

In the example above, we do not know for sure that gid://shopify/ApiFulfillmentService/1234567 and gid://shopify/FulfillmentService/1234567 correlate to the same fulfillment service. Although it is likely that they are the same fulfillment service, this uncertainty means that it may be possible to delete the wrong fulfillment service using this solution. In order to avoid this mistake we must correlate the two identifiers (and I'm not sure that there's a way to do that).

Accepted Solution (1)

Liam
Shopify Staff
2602 281 716

This is an accepted solution.

Hi,

 

Just to confirm, is the solution you posted working for you?:

 

"If your Admin API GraphQL Id has the string ApiFulfillmentService in it, then replace that string with the string FulfillmentService."

 

 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Reply 1 (1)

Liam
Shopify Staff
2602 281 716

This is an accepted solution.

Hi,

 

Just to confirm, is the solution you posted working for you?:

 

"If your Admin API GraphQL Id has the string ApiFulfillmentService in it, then replace that string with the string FulfillmentService."

 

 

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog