-
-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation: write a guide on how to use ShopifySharp with the GraphQL API #1099
Comments
Hi, |
Hey @ThatBrianK! I'm planning to support the Rest API, and therefore the ProductService, for as long as Shopify themselves support it. New apps won't be able to use the Rest API after April 2025, and if I had to bet, I'd put my money on the Rest API being removed completely in April 2026 for existing apps. I don't plan on deprecating ShopifySharp itself at any point though, since I still use it every day for my own Shopify apps and for my clients' apps. We'll have the same |
Thanks for the update. I really feel the 6 month deadline looming ( I need to be able to support new clients), and I'm completely new to graphQL. I am going to try and document as best I can my process of converting my existing product/variant sync with the existing ProductService and ProductVariantService to queries written for graphQL, so that maybe it can be helpful to others in my situation. It's too bad it's so different, as the primary reason for me using ShopifySharp was how easy it made working with products and variants as all the fine details were taken care of. |
Yes. This would be great. |
@nozzlegear finalization of your plans regarding this would be very appreciated. Now i know, that i should better use the GraphQL service as i don´t want to change the integration anytime soon. In my opinion this topic should be noticable highlighted in README when visiting the this repo to avoid probably many frustration when somebody is not aware that this integration is using the REST API by default. Also as on Shopify docs the deprecation of REST API is so present that i would never think that any maintained Sdk would still use this Api anymore. |
Hey @contech-ernst-meinhart, thanks for bringing this up! I've been actively working on #1051 for the last month or so, which has been my main blocker for moving forward with any other GraphQL improvements, including documentation; I wanted to start off with a solid foundation. That said, over the last couple days I've been actively cleaning up the commits in that PR and splitting them into smaller PRs. It will be merged today, along with documentation on how to use the GraphService. After that, I'm going to begin writing a more in-depth guide on using Shopify's GraphQL API with the GraphService. It'll probably be something along the lines of "how to create, update and manage products using ShopifySharp and Shopify's GraphQL API" since that's a popular topic. Following that, I have two plans:
Let me know what you think! |
I missed this part. The situation has been a bit confusing, but the REST API is still "allowed" for any app that's already been approved and published on the app store, and for any custom app that was created before a certain date. That's why ShopifySharp still supports the REST API: Shopify has certainly deprecated it, but it's not dead yet and existing apps can still use it for at least another six months. You're right about the documentation though; the fact that new apps must use the GraphService really needs to be called out. |
Hi @nozzlegear I understand that you have been working on some significant changes in a separate branch. I haven't had a look into the specific changes yet. I understand that you are exploring generating method based on .graphql files and also 'repurposing the various REST API services and filling them out with Shopify's GraphQL queries and mutations'. Are you planning on creating separate nuget packages for those? I'm not sure that hard coding graphql queries in the project is a good idea. They have been quite aggressive in deprecating fields and changing the API. Hard coding queries might cause some maintenance headaches down the line. |
Thanks @clement911! I'm wary of scope creep too — I've built up a list of interesting ideas that I've wanted to explore while working with clients over the last year, and a lot of it revolves around dev tooling in this space. I'm going to try to be careful not to bloat the base ShopifySharp package itself with stuff that doesn't belong. I think secondary Nuget packages will be the best fit for some of the stuff I've been talking about for sure. For #1072 in particular, I don't see that being included in ShopifySharp itself but rather something like "ShopifySharp.Graph.Generator" (just off the top of my head). I could also see the hardcoded queries/mutations services going into its own Nuget package as well, since it'd be likely to get frequent updates as you said. In that scenario, ShopifySharp could continue along at its somewhat slower release cadence, with the base GraphService and the generated GraphQL classes. As always, I'm open to feedback on this stuff! I'll open up an issue for more discussion on those two packages I talked about soon. |
Shopify has announced¹ that after April 2025, all new public apps submitted to the Shopify app store must use GraphQL, and the REST API will be deprecated. ShopifySharp does support the GraphQL API, but the documentation is extremely lacking. I'm updating the documentation for this right now, and will write a longer guide on building an app with ShopifySharp + GraphQL as well.
¹ https://shopify.dev/changelog/starting-april-2025-new-public-apps-submitted-to-shopify-app-store-must-use-graphql
The text was updated successfully, but these errors were encountered: