We are migrating from REST and trying to accomplish the same as assigning variant.fulfillment_service to the fulfilment service handle. The alternative in GraphQL is per this suggestion.
We are using the inventoryActivate mutation to activate a variant at the fulfilment service location using its inventoryItem.id and the fulfilment service location.id. However we are getting this error: “The variant couldn't be stocked at MYSERVICE because the inventory is managed by MYSERVICE.” - where MYSERVICE is the chosen fulfilment service. This item has never been stocked at this location or any other before.
I hope the error message you’re encountering suggests that the fulfillment service you’re using does not support multi-managed inventory. This means the inventory for the variant cannot be managed at both the fulfillment service location and another location simultaneously. Could you please ensure that the inventory is managed exclusively by the fulfillment service and not at any other location.
Just try using the field stockAtLegacyLocation to activate the fulfillment service location.