ShopifySharp is a .NET library that helps developers easily authenticate with and manage Shopify stores.
MIT License
Bot releases are visible (Hide)
This release fixes a nasty bug in ShopifySharp's LeakyBucketExecutionPolicy
which could cause canceled requests to build up and never be dequeued. If the execution policy was sufficiently swamped (e.g. by a webhook endpoint or just very active usage), then the wait time between requests would increase continuously until each request is waiting potentially 5, 10, 15 minutes between when it enters the queue and when it actually sends. This could lead to OOM exceptions as requests pile up and eventually crash the application, further compounding the problem if this is a webhook endpoint, as Shopify would retry failed requests after 5 seconds.
In addition to that bug fix, this release also adds Product.VariantGids
which can be used to map the REST version of a Shopify product to the Graph version. Remember: Shopify has deprecated the REST API for all product and product-related endpoints, which means eventually we'll all need to migrate to the GraphQL API if we want to work with products.
Full Changelog: https://github.com/nozzlegear/ShopifySharp/compare/ShopifySharp/6.15.0...ShopifySharp/6.15.1
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.
Published by github-actions[bot] 6 months ago
ShopifySharp 6.15.0 has been released and published to Nuget! This release updates our Shopify API version target from 2024-01 to 2024-04. Once you upgrade ShopifySharp, you'll want to make sure you update your Shopify webhook API version in your Partner dashboard to match!
Here's a quick rundown of the things that have changed in this release along with the new API version:
ShippingLine.IsRemoved
ShopifySharp.GraphQL
entities to match the 2024-04 graph schema.CheckoutService
and OrderRiskService
classes as obsolete. Shopify has deprecated all checkout REST APIs in favor of their storefront cart APIs.FulfillmentService.FulfillmentOrdersOptIn
property has been marked obsolete. This property was deprecated by Shopify, as all fulfillment services have already been opted in to fulfillment orders.You can download the latest version of ShopifySharp from Nuget using your IDE, or via the dotnet CLI with dotnet package install shopifysharp
.
Full Changelog: https://github.com/nozzlegear/ShopifySharp/compare/ShopifySharp/6.14.1...ShopifySharp/6.15.0
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.
Published by github-actions[bot] 6 months ago
ShopifySharp 6.14.1 is a minor release which added two authorization scope enums, in addition to making the ShopifyHttpException.RequestInfo
property a nullable string.
You can download the latest version of ShopifySharp from Nuget using your IDE, or via the dotnet CLI with dotnet package install shopifysharp
.
Full Changelog: https://github.com/nozzlegear/ShopifySharp/compare/ShopifySharp/6.14.0...ShopifySharp/6.14.1
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.
Published by github-actions[bot] 6 months ago
This is a new release for ShopifySharp.Extensions.DependencyInjection, bumping the version up to 1.5.0. You can now set the service lifetime when registering ShopifySharp with Microsoft's DI container:
ServiceLifetime serviceLifetime = ServiceLifetime.Scoped;
services.AddShopifySharp<MyRequestExecutionPolicy>(serviceLifetime);
Previously, all services were registered as a singleton and you had no control over the lifetime.
You can download the latest version of ShopifySharp.Extensions.DependencyInjection from Nuget using your IDE, or via the dotnet CLI with dotnet package install shopifysharp.extensions.dependencyinjection
.
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.
Published by github-actions[bot] 6 months ago
This release bumps ShopifySharp's version up to 6.14.0, containing several bugfixes, new entities, and new fields for existing entities. You can download the latest version of ShopifySharp from Nuget using your IDE, or via the dotnet CLI with dotnet package install shopifysharp
.
ShopifyPaymentsDisputeEvidence
entities by @dsargent9182 in https://github.com/nozzlegear/ShopifySharp/pull/1025
Transaction
entity by @clement911 in https://github.com/nozzlegear/ShopifySharp/pull/1016
ShopifyHttpException.RequestInfo
by @clement911 in https://github.com/nozzlegear/ShopifySharp/pull/1022
IGraphService
interface by @adearriba in https://github.com/nozzlegear/ShopifySharp/pull/1015
CheckoutLineItem.Id
a string by @nozzlegear in https://github.com/nozzlegear/ShopifySharp/pull/1048
Full Changelog: https://github.com/nozzlegear/ShopifySharp/compare/ShopifySharp/6.13.0...ShopifySharp/6.14.0
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.
Published by github-actions[bot] 8 months ago
IServiceFactory<T>
A pull request by @adearriba refactored ShopifySharp's service factory classes so that they all use a common IServiceFactory<T>
interface to implement their factory methods. This is then used to dynamically register all service factories in ShopifySharp when you use services.AddShopifySharp()
or services.AddShopifySharpServiceFactories()
.
Published by github-actions[bot] 8 months ago
This release now targets version 2024-01 of Shopify's API! Previously, ShopifySharp was targeting version 2023-07. We've regenerated the GraphQL classes accordingly, so be prepared for breaking changes if you use any of the Graph objects that Shopify has changed in their latest API.
The deprecated CustomerSavedSearchService
has been removed in this release. Shopify recommends that you use the GraphQL Customer Segment API instead.
Full Changelog: https://github.com/nozzlegear/ShopifySharp/compare/ShopifySharp/6.12.2...ShopifySharp/6.13.0
Published by github-actions[bot] 9 months ago
This release fixes a bug with the ShopifyOauthUtility.RefreshAccessTokenAsync
method, which was disposing the static HttpClient in ShopifySharp's InternalHttpClientFactory. If the developer did not supply their own IHttpClientFactory to the ShopifyService via ShopifyService.SetHttpClientFactory
, then any service that attempted to call the Shopify API after the disposal would throw an ObjectDisposedException
for the lifetime of the application.
Note: because the deprecated AuthorizationService.RefreshAccessTokenAsync
calls the ShopifyOauthUtility
behind the scenes, it was also affected by this bug.
More info about this bug can be found in #1005.
Full Changelog: https://github.com/nozzlegear/ShopifySharp/compare/ShopifySharp/6.12.1...ShopifySharp/6.12.2
Published by github-actions[bot] 9 months ago
Reported in #1001 and fixed in #1002 where the CloneableRequestMessage
underlying all request execution policies would fail to clone the request's content if the request wasn't sending JsonContent
. In practice, this only affected the PartnerService, GraphService, and any service that derived from them, and only if the requests were cloned on a retry in the execution policy.
Also reported in #1001 and fixed in #1002 was a bug affecting the LeakyBucketExecutionPolicy
and RetryExecutionPolicy
, where the original request were accidentally disposed before the policies could retry them if they had received an unsuccessful response. This would result in the policies throwing an ObjectDisposedException
.
ShopifySharp's documentation has a new home thanks to @Laurabee530! Where before all of the documentation for the package was crammed into the main readme – which made for a very long scroll – you can now find the documentation for each individual service in ShopifySharp's wiki here on Github.
Full Changelog: https://github.com/nozzlegear/ShopifySharp/compare/ShopifySharp/6.12.0...ShopifySharp/6.12.1
Published by github-actions[bot] 9 months ago
A bug was fixed in #997 that could cause the ShopifyDomainUtility.IsValidShopDomainAsync
method to erroneously return true in cases where the response contained an X-ShopId
header with an empty value. (#995)
The following changes were made to the exception classes in ShopifySharp:
ShopifyHttpException
, which inherits from the base ShopifyException
. This new exception should be thrown whenever an http request fails or returns an error.ShopifyRateLimitException
inherit from the ShopifyHttpException
.ShopifyException
:
HttpStatusCode
RequestId
Errors
RawBody
ShopifyException.HttpResponse
property.ShopifyService
, GraphService
and PartnerService
classes to throw a ShopifyHttpException
where applicable.ShopifyException.Errors
string list in some cases. This error message was an exact duplicate of the exception's message.Added small enhancements to the Leaky Bucket execution policy and the Retry execution policy to make them retry certain common request http request failures. I've based this code off of the retry policy found in Microsoft's Azure.Core SDK (MIT licensed), though it's not quite a one-to-one match since we don't have the concept of an HTTP pipeline in ShopifySharp.
These are the status codes that will be retried if a request fails in the Leaky Bucket and Retry execution policies:
case 408: // Request Timeout
case 429: // Too Many Requests
case 500: // Internal Server Error
case 502: // Bad Gateway
case 503: // Service Unavailable
case 504: // Gateway Timeout
The policies will retry these requests up to three times before throwing a ShopifyHttpException
.
Importantly, the default behavior of the Leaky Bucket and Retry policies should remain intact -- they won't start retrying additional responses unless you opt-in to the behavior by using the new constructor overloads on each policy. I wanted to make this change available for testing and feedback right now, so I can gather some feedback on it.
Full Changelog: https://github.com/nozzlegear/ShopifySharp/compare/ShopifySharp/6.11.0...ShopifySharp/6.12.0
Published by github-actions[bot] 10 months ago
Published by github-actions[bot] 10 months ago
Full Changelog: https://github.com/nozzlegear/ShopifySharp/compare/ShopifySharp/6.8.2...ShopifySharp/6.8.3
Published by github-actions[bot] 10 months ago
services.AddShopifySharpUtilities
by @nozzlegear in https://github.com/nozzlegear/ShopifySharp/pull/980
Published by github-actions[bot] 10 months ago
This release is just a small version bump to take ShopifySharp from 6.8.0 to 6.8.2, so that an unlisted/erroneous 6.8.1 version that was released two months ago on Nuget will not accidentally be installed due to package versioning rules.
Full Changelog: https://github.com/nozzlegear/ShopifySharp/compare/ShopifySharp/6.8.0...ShopifySharp/6.8.2
Published by github-actions[bot] 10 months ago
factory.Create(string shopDomain, string accessToken)
overload to all service factories by @nozzlegear in https://github.com/nozzlegear/ShopifySharp/pull/979
Full Changelog: https://github.com/nozzlegear/ShopifySharp/compare/ShopifySharp/6.7.0...ShopifySharp/6.8.0
Published by github-actions[bot] 10 months ago
Full Changelog: https://github.com/nozzlegear/ShopifySharp/compare/6.4.0...6.6.0
Published by github-actions[bot] 10 months ago
This release introduces a new ShopifySharp.Extensions.DependencyInjection package, which can be used to add ShopifySharp's various service factory interfaces to your DI container with Microsoft's Dependency Injection package.
Published by github-actions[bot] 10 months ago
ReadOnlyMemory<byte>
by @Socolin in https://github.com/nozzlegear/ShopifySharp/pull/969
Full Changelog: https://github.com/nozzlegear/ShopifySharp/compare/6.6.1...ShopifySharp/6.7.0
Published by github-actions[bot] 12 months ago
Full Changelog: https://github.com/nozzlegear/ShopifySharp/compare/6.6.0...6.6.1
Published by github-actions[bot] over 1 year ago
IFulfillmentService.CancelAsync
ShopifySharp.Infrastructure.DefaultHttpClientFactory
Fulfillment.OriginAddress
to FulfillmentOriginAddress
Full Changelog: https://github.com/nozzlegear/ShopifySharp/compare/6.1.2...6.2.0