I’m migrating from REST to GraphQL, so I’m fairly new with GraphQL. When retrieving orders I have figured out most of what I need, but I’m having trouble getting the payment details transactions for the order. If I add the following section to my query for example:
paymentDetails { CardPaymentDetails { paymentMethodName } }
I get the following error:
{“errors”:[{“message”:“Selections can’t be made directly on unions (see selections on PaymentDetails)”,“locations”:[{“line”:1,“column”:857}],“path”:[“query”,“orders”,“nodes”,“transactions”,“paymentDetails”,“CardPaymentDetails”],“extensions”:{“code”:“selectionMismatch”,“nodeName”:“PaymentDetails”}}]}
Anyone have an idea on how I get around this?