I am migrating from REST to Graphql, the rest code is well established and has been is use for over 5 years, so I am not new to shopify, but new to the graphQl.
I am using the shopify graph ql app to generate a query…
{
shop {
name
}
locations(first: 10) {
edges {
node {
fulfillmentService {
id
location {
id
}
}
id
}
}
}
}
It’s possible the locations are not configured as fulfilment services, if you run this, you should see if the locations are set up as fulfillment services and get additional details about the fulfillment service, if available.
query {
locations(first: 10) {
edges {
node {
id
name
isFulfillmentService
fulfillmentService {
id
serviceName
type
}
}
}
}
}
Thanks Liam, they both come back as false.
I have made them both fulfillment inventory locations and added a shipping service.
Note this is my test shop, not a live one - they work ok at the moment using rest.
So a location might be used for shipping inventory directly to customers but is not configured as a third-party or manual fulfillment service in Shopify’s system.
I’m currently migrating from the REST Admin API to the GraphQL Admin API, and I’ve noticed a difference in how fulfillment service locations are returned.
In my store, I have third-party fulfillment services (e.g., Red Stag Fulfillment, ShipBob Fulfillment).
When I use the REST API, I can retrieve all locations — including fulfillment service locations — successfully:
GET /admin/api/2023-10/locations.json
However, when I query the GraphQL Admin API, I only see Shopify-managed locations.
The custom/third-party fulfillment service locations do not appear.
Here’s the GraphQL query I’m using:
{
locations(first: 50) {
edges {
node {
id
name
address {
address1
city
province
country
zip
}
}
}
}
}
This only returns Shopify locations and seems to filter out fulfillment service locations automatically.
Question:
Is this the expected behavior for the GraphQL API?
If so, is there any way to include or query third-party fulfillment service locations (like those returned by the REST API)?