question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Seeking input on improved GraphQL support

See original GitHub issue

Hey 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:closed
  • Created 4 years ago
  • Comments:38 (15 by maintainers)

github_iconTop GitHub Comments

3reactions
clement911commented, Jun 19, 2019

Nice to see ShopifySharp mentioned on Here’s Everything We Announced at Shopify Unite 2019 👍

1reaction
clement911commented, Nov 8, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GraphQL adoption patterns
With this type of implementation, teams are often motivated to adopt GraphQL ... A more productive way forward for teams searching for better...
Read more >
Making Graphql input where input can take different types
The solution I am looking for is that I have only one api : createAnimal(input: CreateAnimalInput!) Since interface support is not there ...
Read more >
GraphQL specification
GraphQL. June 2018 Edition. Introduction. This is the specification for GraphQL, a query language and execution engine originally created at Facebook in ...
Read more >
GraphQL errors: the Good, the Bad and the Ugly
Returning errors in GraphQL is a challenging task, and we tried a ... Structured errors help us improve the user experience of our...
Read more >
10 GraphQL Developer Tools I Use To Make Building APIs ...
Discover the best GraphQL Dev Tools that can help you streamline your development workflow. From full stack development, to schema visualization ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found