Seeking input on improved GraphQL support
See original GitHub issueHey everyone! Last week I was contacted by a developer at Shopify who’s been reaching out to various community-maintained Shopify packages, advocating for increased support for the GraphQL API. While ShopifySharp does have basic support for GraphQL, I’d love to hear some thoughts on how we can make this work and feel better in C#. If anyone has used a .NET GraphQL package that had a great experience, please let me know!
One of my primary goals with ShopifySharp is to give as much security around Shopify objects as possible. With the rest API, that means modeling each object with classes in C#, deciding the best types for certain properties, and so on. It’s my understanding that with GraphQL, the developer can specify exactly what kind of object they want to receive (and send). So if you only need an order’s total value, you can just specify that property and receive an object that looks like { totalValue: ... }
. The Order class itself is unnecessary in this situation, since all of the properties except totalValue
will be empty.
My big question: how can we provide intellisense and strong typing on the data that gets returned, when that object could be any shape the developer sees fit? Do we just make the method generic and have the developer come up with their own classes?
Issue Analytics
- State:
- Created 4 years ago
- Comments:38 (15 by maintainers)
Nice to see ShopifySharp mentioned on Here’s Everything We Announced at Shopify Unite 2019 👍
I just haven’t had the time to do it so far, especially given that we can manipulate query string in the mean time. But I think variables will be the next logical thing to add.