Development discussions around Shopify APIs
Bulk GraphQL : While fetching the data for LineItem alone, we have observed that unless we select the Order ID, the data will not be retrieved. However the output comes with two different JSONL object - 1. Order Level, 2. Order Line Level. Can you confirm if there is a way to bring only the LineItem JSONL ?
Below query is showing the error ('userErrors : ', [{u'field': [u'query'], u'message': u"The parent 'node' field for a nested connection must select the 'id' field. Connection fields without 'id': orders."}]). Please advise whether we can retrieve only line items using bulk graphql ?
mutation {
bulkOperationRunQuery(query: """
{
orders {
edges {
node {
lineItems {
edges {
node {
id
}
}
}
}
}
}
}
""") {
bulkOperation {
id
status
}
userErrors {
field
message
}
}
}
This phenomenon isn't just in regard to bulk operations. It applies to any GQL request. You can test out a test request for the first 10 orders using the GraphiQL shop app. One of the tenants of GQL is that at least the id field must be included for a edges-->node scenario. That's why the GraphiQL shop app will automatically insert the id field if you exclude it in your request.
Thanks for response.Does that mean there is no way to bring only the LineItem JSONL using bulk graphql ?
User | RANK |
---|---|
10 | |
6 | |
5 | |
5 | |
5 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022