Comments (19)
from shopifysharp.
I fixed another small bug and queued a new release to be reviewed.
https://github.com/nozzlegear/ShopifySharp/actions/runs/6413991536
from shopifysharp.
Speaking of, I think you had used some new c# feature in your recent commit 1f1ccd1 , which broke the build.
I also would like to use these new features 😀
from shopifysharp.
from shopifysharp.
I don't have a ton of experience in that area either.
Is there a way to see the percentage of nuget installs that targets .Net framework?
The change I have is similar in spirit to what Chili Cream would get you (if I understand Chili Cream).
It's just a few lines of code to query the graphl model via introspections and generate POCO classes.
from shopifysharp.
from shopifysharp.
FYI This is what the generated schema file looks like: https://github.com/Wish-Org/Wish.GraphQLSchemaGenerator/blob/main/Wish.GraphQLSchemaGenerator.Tests/shopify.cs
It makes it much easier to query grapqhl.
It's worth noting that the generated schema uses System.Text.Json and not Newtonsoft.
I've already updated ShopifySharp to be able to use System.Text.Json when using the GraphService.
However, we cannot include the generated shopify.cs above in ShopifySharp because it contains .NET 6 features such as System.DateOnly and interface default implementations 😢
from shopifysharp.
I think I figured it out 🙂
I've added a target framework for .net6.0 specifically and added a pre-compile directive to only include the generated GraphQL types for .net6 or greater.
Here is an example on how to use the generated graphql types to query grapqhl with strongly typed objects:
ShopifySharp/ShopifySharp.Tests/GenerateGraphQLSchema_Test.cs
Lines 53 to 79 in d139d78
from shopifysharp.
I'm going to leave open though, as using pre-compile directive is not great.
from shopifysharp.
@nozzlegear ready for you to approve: https://github.com/nozzlegear/ShopifySharp/actions/runs/6182839771
from shopifysharp.
@nozzlegear I know I made a few important changes. Let me know if you have any concern.
from shopifysharp.
from shopifysharp.
Haha no worries. Thanks 👍
from shopifysharp.
No problem. There is no rush by the way so take your time
from shopifysharp.
@nozzlegear seems like you got busy.
Any chance you could review the pending release deployment?
from shopifysharp.
from shopifysharp.
I needed the latest lib so I've just pulled the pre-release nuget package.
It's in production already. No issues so far.
from shopifysharp.
from shopifysharp.
I'm going to close this for now I think. I'm not sure what (if anything) has changed, but we're now able to use C# 12 in the project records, file-scoped namespaces, and #nullable enable
which previously wasn't available to netstandard2.0. It all builds just fine with no warnings, and the automated tests I have for .NET Framework 4.7.2 have no problems either.
The only thing that I've tried to use which I wasn't able to was System.Buffers
(needs .NET 7.0 or greater) and the required
keyword (needs .NET 8.0). I'm happy with using the preprocessor directives to add those as little "nice to have enhancements" for people using .NET 7/8, like I did with the ShopifyRequestValidationUtility.
from shopifysharp.
Related Issues (20)
- Deprecated property delivery_category is being used HOT 2
- How to list order by product ? HOT 3
- API get checkout by token not working HOT 6
- Internal application stopped working HOT 2
- Order not coming in api HOT 2
- Adding Multiple Tracking Numbers with Fulfillment.TrackingNumbers HOT 3
- Add read_returns and write_returns to access scopes enums HOT 2
- Customer is not returned by graphql mutation HOT 2
- LeakyBucket does not release the Semaphore if a request fails or the task is canceled
- Missing Alt attribute in ArticleImage class
- HttpResponseMessage Response in RequestResult marked as Obsolete HOT 5
- Add support for IAsyncEnumerable on every service that supports ListAsync
- Add support for validating the timestamp with a default timeout period in `ShopifyRequestValidationUtility`
- IsValidShopDomainAsync should check if shopDomain is a valid uri before building the shop domain uri HOT 2
- Support for Meta Objects? HOT 6
- RefundLineItem SubTotalTaxSet - copypaste issue? HOT 1
- Feature: Generate methods based on .graphql files HOT 2
- OrderRiskService Deprecated / Obsolete HOT 2
- New 'current_quantity' field of order 'line_items'
- Company / Channels / Publications HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shopifysharp.