Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
What is wrong with the following component?
Solved! Go to the solution
This is an accepted solution.
Hi @dev12341
Hope you're having a great day!
What error do you get when you execute your code. I can assure you that your mutation works well:
Retrieving created product:
The returned "data" object is "undefined". And no product is being created.
I am using it inside the example from https://shopify.dev/tutorials/build-a-shopify-app-with-node-and-react/fetch-data-with-apollo
Thanks for the help.
It seams the issue is with the React code and the <Mutation> implementation. Perhaps something is not correctly defined?
This is an accepted solution.
hey! how did you solve this? The solution (Apollo docs) only shows solutions for using functional components but I'd rather use a Class component if you figured out how .. thanks.
User | RANK |
---|---|
5 | |
4 | |
4 | |
3 | |
3 |