Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Shopify store front SDK and React invoked error

Shopify store front SDK and React invoked error

mobileEcom
Visitor
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.

We are using: 

import { gql } from "babel-plugin-graphql-js-client-transform";
 

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)

angadp
Tourist
3 0 1

Any update on this. Facing the same issue.

michaeltheodore
Explorer
59 6 9

Any particular reason as to why you're using this package?

babel-plugin-graphql-js-client-transform