Summary
This is a big new release for ShopifySharp with lots of changes inside! If you're using the ProductService or Products API, make sure you've started your migration over to Shopify's GraphQL Products API using the GraphService – Shopify has deprecated the REST API for products1 and product-related-things. All public apps are required to migrate to the GraphQL product API by February 1st, 2025, and all custom apps are required to migrate by April 1st, 2025. 2 Read up on this release, grab the latest version of ShopifySharp and then head over to the wiki page where you can find a guide on using ShopifySharp's GraphService to write GraphQL queries and mutations, with examples featuring the product API.
In line with those requirements, this release of ShopifySharp has many changes aimed at improving the GraphQL experience for developers. From standardizing the methods on ShopifySharp's GraphService class to make it less confusing, to adding baked-in graphql syntax highlighting and intellisense with minimal setup, the experience with the GraphService compared to even just one release should be miles ahead.
Our goal is to make the experience of writing graph queries in ShopifySharp and C# in general as painless as possible. I have a lot more improvements still planned, so I'd love to hear your feedback on how things feel in this release and how they can still be improved.
What's Changed
Here's a grand overview of everything that's new or changed in ShopifySharp 6.22.0:
- Fixed a content disposal bug that affected .NET Framework in #1130.
- Many previous GraphService and IGraphService methods were deprecated, and all methods have now standardized on
GraphService.PostAsync(GraphRequest)
,GraphService.PostAsync<T>(GraphRequest)
andGraphService.PostAsync(GraphRequest, Type)
in #1051. - The GraphService's error handling was updated and standardized to consistently throws
ShopifyGraphErrorsException
andShopifyGraphUserErrorsException
when errors are parsed from the response from Shopify in #1127. - Added an
IHttpContentSerializer
andGraphContentSerializer
in #1122.- The intent is to open these up and make them injectable for fine-grained control of how content is serialized before it's sent to Shopify.
- Added an
IJsonSerializer
andSystemJsonSerializer
in #1123.- Related to the previous, the intent here is to open these up as well and make them injectable for fine-grained control of how content is serialized/deserialized/parsed.
- There will also be a NewtonsoftJsonSerializer.
- The ProductService, ProductVariantService, ProductImageService, ProductListingService, along with their related interfaces and factories, were all deprecated in #1128.
- Regenerated the GraphQL entities in the ShopifySharp.GraphQL namespace in #1115.
- Dependencies were updated in #1121.
- Added documentation for using the GraphService in #1126.
Full Changelog: ShopifySharp/6.21.0...ShopifySharp/6.22.0
How to support ShopifySharp
If you find ShopifySharp useful, please consider contributing to the project! If you'd rather contribute financially, you can do so by sponsoring the author here on Github, or by purchasing a copy of The Shopify Development Handbook on Gumroad.
-
Shopify has actually deprecated the entire REST API, but they've deprecated the Products API ahead of everything else. We're expected to migrate everything over to the GraphQL API eventually! ↩
-
Product API migration dates: https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model ↩