Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Return response from mutation draftOrderCreate

Return response from mutation draftOrderCreate

Cristi_U
Shopify Partner
3 0 1

Hello,

 

So I'm using mutation draftOrderCreate from my app to create a draft order, which is working fine, but the response I get is like this:

 

Array
(
    [headers] => Array
        (
            [status] => HTTP/1.1 100 Continue
        )

    [response] => HTTP/1.1 200 OK
Date: Fri, 25 Mar 2022 12:22:21 GMT
...

{"data":{"draftOrderCreate":{"draftOrder":{"id":"gid:\/\/shopify\/DraftOrder\/843882856655","invoiceUrl":"...
)

 

The problem is that the header lines are in the [response], and with any other api requests the [response] array was having only the json data.

So I'm really confused about this on how to handle this type of response 

Replies 0 (0)