gnikyt / Basic-Shopify-API

A simple API wrapper for Shopify using Guzzle for REST and GraphQL
MIT License
220 stars 66 forks source link

Query is not working #142

Open tkeesdevs opened 1 year ago

tkeesdevs commented 1 year ago

I am trying to do a call using some query, but is not working on PHP, is showing me a empty array

                  $result = $shop->api()->graph('{
                                                                        orders(first: 5, sortKey: ID, reverse: true, query: "id:<4944623304880") {
                                                                          edges {
                                                                            cursor
                                                                            node {

                                                                              id
                                                                              name
                                                                            }
                                                                          }
                                                                          pageInfo {
                                                                            hasNextPage
                                                                            hasPreviousPage
                                                                          }
                                                                        }
                                                                      } ');

If I remove the query, it is showing data:

                  $result = $shop->api()->graph('{
                                                                        orders(first: 5) {
                                                                          edges {
                                                                            cursor
                                                                            node {

                                                                              id
                                                                              name
                                                                            }
                                                                          }
                                                                          pageInfo {
                                                                            hasNextPage
                                                                            hasPreviousPage
                                                                          }
                                                                        }
                                                                      } ');

if I do the same query on graphql App is working... image

someone can helpme?