-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
Concern about loss of deprecated GraphService.PostAsync methods #1142
Comments
Hey @judoscott, thanks for reaching out about this! I understand your concern about losing the method you rely on. In the long term, I do still plan on removing it, but I can promise you that they'll remain available in the latest versions of ShopifySharp for at least the next 60 days. I try to do my best to give everyone plenty of time to migrate off of methods or classes that have been deprecated, so I don't want to pull the rug out and remove things as quickly as possible. It looks like I forgot to include it in that obsolete message, but what I recommend everyone use now is Here's the interface for Here's a link to the docs I've written on using the GraphService and the updated |
Thanks.. I did get some working examples of the the method GraphService.PostAsync(GraphRequest graphRequest) working today that you refer too. At the moment I am hung up on at the moment is this:
I use Visual Studio 2022 and I am not familiar with how yml files are processed for this. I do get the concept just no experience using it. So currently in a research mode to see how to implement it with my set up. If you have any examples or links I would be very grateful. |
Ah unfortunately I'm on a Mac so I'm not familiar with how Visual Studio's GraphQL plugin works myself, I was hoping the setup would be simple! 😅 The file should physically go at the root of your project, as the path inside the yml file needs to point to the other graphql.schema.json file you downloaded. I'm not positive, but it might help to include the yml file in your solution too (right click, add existing item to solution). That might help the plugin find it. |
gotcha I did try using classes we already have from https://github.com/Husqvik/GraphQlClientGenerator/ But haven't gotten it to work. object returns but all values are null |
Hmm, could you post some example code I could take a look at? |
Hey @judoscott, just wanted to check in – did you manage to get those classes working? |
@nozzlegear I determined my issue it because my generated classes can handle System.Text.Json or Newtonsoft but not a project with both. I wrote a class that inherits GraphService and takes the new GraphRequest object but outputs JToken so that I could keep on moving to make my deadlines. Will go back and make something more efficient later. |
[Obsolete("This method is deprecated and will be removed in a future version of ShopifySharp.")] public virtual async Task<JToken> PostAsync(string graphqlQuery, int? graphqlQueryCost = null, CancellationToken cancellationToken = default)
We were unable to migrate to the latest version of this library because of this issue: #1080
Now that its resolved in prerelease I have upgraded a branch and see that the above method is deprecated. Please consider keeping it we have a lot of stuff built on it. If you can't do that please keep it for a significant time to allow time for our migration while using current packages,
Thanks for all the great work
The text was updated successfully, but these errors were encountered: