A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
I am trying to migrate a part of my REST API to GraphQL API. In particular, I try to sum different variants' weight. I can use the grams in the REST API but the field is missed in the GraphQL API. Why is it a difference?
They are different APIs so whilst there is similarities, there will be differences. GraphQL does has weight and weight unit properties that you can use to achieve the same result.
Is there an issue pulling the data from a different place?
Thanks for your prompt reply.
I am trying to combine several variants into 1 new variant. The new variant is created by my app. So I was using the grams field to calculate the total weight. After that, convert the total weight in g to another weight unit for variant creation.
Now the grams field is missed and it's getting a bit difficult. I try to do the unit conversion between 'g', 'kg', 'lb', 'oz' on my own. Still works but is easier to trigger a calculation error.