"message": "GraphQL Client: Not Found" Node JS

Hello,

I’m new to the Shopify API..

I’m trying to implement a process in my server to update the inventory count for items from the api using the GraphiQL method outlined in the documentation…

Here is my Query:

const updateInventoryQuery = mutation inventoryAdjustQuantities($input: InventoryAdjustQuantitiesInput!) { inventoryAdjustQuantities(input: $input) { inventoryAdjustmentGroup { id reason changes { name delta quantityAfterChange item { id } location { id name } } } userErrors { field message } } };

module.exports = updateInventoryQuery;

I am only receiving the error:
“message”: “GraphQL Client: Not Found”,

I’ve tested in the Shopify GraphiQL App and I am receiving this response:

{
“errors”: [
{
“message”: “Access denied for inventoryAdjustQuantities field. Required access: write_inventory access scope. Also: The user must have a permission to apply changes to inventory quantities.”,
“locations”: [
{
“line”: 2,
“column”: 3
}
],
“path”: [
“inventoryAdjustQuantities”
],
“extensions”: {
“code”: “ACCESS_DENIED”,
“documentation”: “Shopify API access scopes”,
“requiredAccess”: “write_inventory access scope. Also: The user must have a permission to apply changes to inventory quantities.”
}
}
],
“data”: {
“inventoryAdjustQuantities”: null
},
“extensions”: {
“cost”: {
“requestedQueryCost”: 13,
“actualQueryCost”: 10,
“throttleStatus”: {
“maximumAvailable”: 2000,
“currentlyAvailable”: 1990,
“restoreRate”: 100
}
}
}
}

However I have checked the scope of the app and it is setup correctly:

Admin API access scopesread_inventory, write_inventory, read_locations, read_products

If anyone could shed any light on why this might be happening or if it’s even possible to accomplish what I’m trying to do with the api it would be greatly appreciated.

Hey @User137 :waving_hand: - I think these may be two separate errors. For the first error, is your app set up using our Remix template as a scaffold? Build a Shopify app using Remix

If you’re not, you may need to include a GraphQL client within your app itself in order to successfully use the GQL API there.

When it comes to the GraphiQL app itself, if the app has the right scopes, it’s still possible an API request will fail if the user of the app in the admin UI making the request doesn’t have the right access. If you’re the owner of the shop, you should be able to make the changes here:

https://help.shopify.com/en/manual/your-account/users/manage-users

Hope this helps!

Hi @user137

Are you still seeing errors after following Alans advice above, or can I mark this as solved?