Graphql Execution

Good morning.

Using Java, is there any endpoint for executing a GraphQL query?

I need to fetch all SKUs with available stock. Currently, I do a GET on the SKU list and then another GET on the balance for each existing SKU in order to filter the ones that have stock. In a case where there are >40k SKUs and only ~3k have stock, that’s a lot of unnecessary requests. Using GraphQL would save a significant amount of resources.

Hey @ribes, how’s it going?

If you disable the “show out-of-stock product” option in each product’s settings, both the on-site search and the Search for Products API will only return SKUs with available stock, which is what you need.