phpclassic / php-shopify

PHP SDK for Shopify API
Apache License 2.0
570 stars 210 forks source link

Add parameter $variables to the GraphQL::post() #109

Closed seka19 closed 4 years ago

seka19 commented 5 years ago

Shopify API supports passing graphql-query with variables as separate field (https://help.shopify.com/en/api/getting-started/shopify-and-graphql/variables#variables-in-curl), but here was no options to do that.

I've added new parameter to GraphQL::post() and done neccessary changes in HttpRequestGraphQL::prepareRequest() to use correct Content-type header.