Hello,
I created the fulfillmentService and when I query it by ID it works fine.
Create Query
var fulfillmentServiceCreateRequest = new GraphQLRequest {
Query = @"
mutation fulfillmentServiceCreate($name: String!, $callbackUrl: URL!) {
fulfillmentServiceCreate(name: $name, callbackUrl: $callbackUrl) {
fulfillmentService {
id
serviceName
callbackUrl
location {
id,
name
}
}
userErrors {
field
message
}
}
}
",
OperationName = "fulfillmentServiceCreate",
Variables = new {
name = "Test Fulfillment Service",
callbackUrl = "https://shopify.test.com/"
}
};
Get By ID Response
{
"fulfillmentService": {
"id": "gid://shopify/FulfillmentService/68707713367?id=true",
"serviceName": "Test Fulfillment Service",
"callbackUrl": "https://shopify.test.com/"
}
}
Then when I try to delete it, I get the default locationId and set it together with fulfillmentServiceId for deletion.
var deleteFulfillmentService = new GraphQLRequest
{
Query = @"
mutation fulfillmentServiceDelete($id: ID!, $destinationLocationId: ID) {
fulfillmentServiceDelete(id: $id, destinationLocationId: $destinationLocationId) {
deletedId
userErrors {
field
message
}
}
}
",
OperationName = "fulfillmentServiceDelete",
Variables = new
{
id = "gid://shopify/FulfillmentService/68707713367?id=true",
destinationLocationId = defaultLocation.Id
}
};
In the response I get no errors and no userErrors. deletedId is also null.
"statusCode": 200,
"data": {
"fulfillmentServiceDelete": {
"deletedId": null,
"userErrors": []
}
},
"errors": null,
So what is happening here? I hardcoded the id, tried with and without this “id=true” query string. Tried to enter invalid Location ID (then I get actual error). Any advice or ideas why it might not work for deletion? There are no pending orders or anything like that, it’s an empty store.