/api/2023-07/graphql.json, with this endpoint i am not getting all cart items that i have in my cart. although cart amount is reflecting correct but for some products are not reflecting in cart.
This endpoint is now over 2 years old and so is not supported anymore.
You should upgrade to a newer supported API version and check the upgrade guides.
Tried 2025-07 as well but issue remains the same.
What query are you running for this? And against which API, storefront I assume but just checking?
endpoint:- https://${website_url}/api/2025-07/graphql.json
graphql:-
query {
cart(id: “gid://shopify/Cart/hWN2ny1Yxcs09?key=e02b314ceda732f1468”) {
id
discountCodes {
applicable
}
checkoutUrl
cost {
totalAmount {
amount
currencyCode
}
}
lines(first: 100) {
edges {
node {
merchandise {
… on ProductVariant {
id
title
product {
id
title
}
}
}
}
}
}
}
}
This will only get you the first 100 cart items as you specified that in your first
parameter.
You will likely need to paginate over the line items to get them all. Please see Shopify example Paginating results with GraphQL
I am only having 2 items in my cart.
Does the query return any data for you?
Your cart id looks a lot shorter than I would expect, for example Create and update a cart with the Storefront API
it is returning only 1 item, whereas i have added 2 items. also i have trimmed some part of cart_id that’s why it look shorter