Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any way to perform GraphQL queries as if they are coming from the Shopify Admin? #317

Open
threedytotal opened this issue Jan 15, 2024 · 0 comments

Comments

@threedytotal
Copy link

I need to access some GraphQL queries that are used from inside the Shopify Admin but that aren't yet exposed in the public APIs. Is there any way to do this?

The URL that the Shopify Admin is hitting is https://admin.shopify.com/api/shopify/?operation=PurchaseOrderList&type=query and the query is for PurchaseOrderList and purchaseOrders.

Attempting to perform the same query via the iGraphQL app or using the php-shopify's GraphQL gives errors that indicate that those queries aren't known about in even the unstable API.

Using Chrome dev tools to extract the full Shopify Admin request results in a curl command that can be run outside of the admin with no apparent problems. It looks like the request is authenticated via cookies, so perhaps there is something in there that is marking the request as 'allowed to use the private API', but cookies can't be sent when using the basic authentication.

Anyone got any ideas what could be done here? Is it possible to generate login cookies using the php-shopify app and then craft a custom curl command that would fetch the information needed for example?

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant