Storefront API is not working with handle

did anyone can help me here I am using storefront API Query looks like

{ 
  productByHandle(handle:"my-handle") { 
    variants(first:1) { 
      edges { 
        node { 
          id 
        } 
      }
    }
  }
}

and the response is coming like

{
    "data": {
        "productByHandle": null
    }
}

Note: Storefront API are correct/working fine tested with other queries

This response is returned when no products with handle equals to “my-handle” exist. Are you sure you have a product like this?

Hi @Visely-Team “my-handle” Its just the example I have tested with the correct handle

Is the product available? I.e. assigned to the Online Store channel?

1 Like

@Visely-Team Yes, the Product is also available. have inventory and assigned to online channel

Hey @Arunk ,

Can you please send along the product_id for the product you’re having an issue with, and please let me know your app’s ID ( the last set of numbers in the URL when viewing the app in the Partner Dashboard). I can use this to investigate further and hopefully spot the issue.

1 Like

I found the solution to its permission issue we can say. we have to make the “Access Products” checked it’s not mentioned anywhere in docs but it’s working

Thank you @Visely-Team @_JB

Nice, didn’t know about that one. Funny thing it is misspelled :slight_smile:

I had this too. The name of that sales channel is the name app I think. For me it was a time thing, as I think the app needs to be applied (added to the sales channels for each product) and that takes time