403 Error On collectionsByHandle useLazyQuery Call

tomadelaney
Tourist
7 2 2

I am encountering a 403 Error when I try to execute useLazyQuery on the getCollectionByHandle query:

const GET_COLLECTION_BY_HANDLE = gql`
   query CollectionByHandle ($handle: String!) {
      collectionByHandle(input:$handle) {
         id
         handle
      }
   }
`;
const [getCollectionByHandle, { data:data4, loading:loading4, error:error4, called:called4 }] = useLazyQuery(GET_COLLECTION_BY_HANDLE);

The query works fine in the GraphiQL App, but fails when I try to pass the same input variables in an application, though all product mutations and queries work.

My declared scopes are as follows:

SCOPES=read_products,write_products,read_customers,write_customers,read_draft_orders,write_draft_orders,read_orders,write_or 

Any thoughts on what I am doing wrong would be most appreciated.  Thank you. 

Replies 0 (0)