GraphQL::Client::ValidationError: Field 'fulfillmentLineItem' doesn't exist on type 'ReturnLineItemType'

I have api version 2024-10

It is not working, as I see fulfillmentLineItem was removed from returnLineItems.
How can I find which product is related to each returnLineItems?

order_query = <<-GRAPHQL
{
orders(first:1, query:“id:#{shopify_order_id}”) {
edges {
node {
id
name
returns(first: 10) {
edges {
node {
id
status
returnLineItems(first: 20) {
edges {
node {
quantity
returnReason
fulfillmentLineItem {
lineItem {
name
variant { id }
}
}
}
}
}
}
}
}
}
}
}
}
GRAPHQL

1 Like

Hey @Igor_Kozharko

Thanks for sharing that. The fix here is to use an inline fragment. Here’s an example:

returnLineItems(first: 20) {
  edges {
    node {
      quantity
      returnReason
      ... on ReturnLineItem {
        fulfillmentLineItem {
          lineItem {
            name
            variant { id }
          }
        }
      }
    }
  }
}

Let me know if that works.

great. it works.
thank you very much.
but, I did not find such an example in the documentation

Yeah, we had a similar issue here. I’ve let our teams know about this.