Questions/Tutorial about Partners API (Graphiql) - Total App Earnings

New Member
1 0 0

Hello Shopify Devs, 

Quick Introduction:
I'm new to the Partners API which is using Graphiql.
Till now I was using the REST API (with PHP) for building applications. This is my first time with Graphiql and from the docs, I do not understand how to work with it.

I have made a quick function in PHP to access the Partners API via curl and everything is working fine, but when I start building queries I do not know how to retrieve the data I want.
I have tested the functionality and it works fine with basic information - retrieving the API Key from Application with ID.


            $query = 
                  app(id: "gid://partners/App/12345") 



I have tried Graphiql Explorer,  but still, I cannot understand how to access the data I want (from Partners API).


What data I want to retrieve:
- TOTAL APP EARNINGS from Application ID filtered by Shop URL
In other words, I want to get this data:



Thanks in advance.