Shopify store front SDK and React invoked error

mobileEcom
New Member
2 0 1

Error: This function should not be invoked. It should be used to tag template literals that will be transcompiled into graphql-js-client's query builder syntax.

Code Example

export const clientQuery = (cursor) => {
  return client.send(gql(client)`query($numOfProds: Int!, $cursor: String) {
        shop {
          name
          description
        }
      }
      `,
      { numOfProds, cursor }
    )
    .then((res) => {
      return res
    });
};   

 

Any help would be appreciated!

Replies 2 (2)
Jaden-Dreams
New Member
2 0 1

Facing similar issues in React. Any update on this by anyone?

Thanks

angadp
Tourist
3 0 1

Any update on this.