productVariant with id "Required parameter missing or invalid"

Hello,

I was able to successfully run this in Postman, but in PHP, it is claiming I am missing a required parameter. Only the id is required, so what gives??

query productVariant {
    productVariant(id: "gid://shopify/ProductVariant/51370387439897") {
        id
        price
        sku
        productVariantComponents(first: 10) {
            nodes {
                id
                quantity
                productVariant {
                    displayName
                    id
                    price
                    sku
                    storefrontId
                    taxable
                }
            }
        }
    }
}

I have also tried using nodes which everybody else seems to have success with, and I get the same response! it also works fine in Postman but not in my php code.

  **query** MyQuery {

  nodes(ids: "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC81MTM3MDM4NzQzOTg5Nw==") {

    ... **on** ProductVariant {

id

product {

id

      }

    }

  }

}

The same cURL code that I am running here is running elsewhere in my app, with success with many queries and mutations, so I was surprised to run into this issue. I am definitely setting content-type and all that.

Any thoughts? thank you!!

Well, the second code chunk got weird. it was supposed to loo like this:

query MyQuery {

  nodes(ids: "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0VmFyaWFudC81MTM3MDM4NzQzOTg5Nw==") {

    ... **on** ProductVariant {

id

product {

id

      }

    }

  }

}”

Use the </> button to paste your code, otherwise it may be broken.
I’d check that you escape quotes properly in PHP code.

Yeah I realize I messed this up…twice. I am unable to delete or edit it. This is my first time posting so I’m unfamiliar with the editor, but I used blockquote.
Not the issue with php though, like I said I have many queries running correctly. Mostly just wondering if there’s something strange or different about the productVariant call. thanks.