Skip to content
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

Shopify Sharp Graph QL - Get Orders issue #1157

Open
ngodhaniQeleo opened this issue Feb 19, 2025 · 6 comments · Fixed by #1154
Open

Shopify Sharp Graph QL - Get Orders issue #1157

ngodhaniQeleo opened this issue Feb 19, 2025 · 6 comments · Fixed by #1154
Labels

Comments

@ngodhaniQeleo
Copy link

ngodhaniQeleo commented Feb 19, 2025

I am using Shopify sharp latest version (6.22.0) in asp.net core (.NET 8.0) C# project. I am getting Orders by Id filter using Graph QL API for getting individual order using below code screenshots

Image

My Order Bucket Class

Image

After executing above code I am facing below error. This error only comes IF I use variant OR customer object in Graph QL Query.
IF I am not using variant OR customer object then it will give successful order response.

Image
Error : Cannot get the value of a token type 'Number' as a string.

So can you please help us for this issue

@ngodhaniQeleo ngodhaniQeleo changed the title Shopify Sharp Graph QL - Get Order issue Shopify Sharp Graph QL - Get Orders issue Feb 19, 2025
@nozzlegear
Copy link
Owner

nozzlegear commented Feb 23, 2025

Hey! I think you might have two problems here, but we can only see one of them because of the exception being thrown when parsing errors; it's hiding the actual error message. I have a fix for this coming in #1154, which I plan to merge and publish tomorrow.

@nozzlegear
Copy link
Owner

As for the actual error: if I had to guess, your app may not have permission to use protected customer data. Accessing it will return an error in that case. You can confirm if that's the case by removing all the customer properties except for id, which isn't protected.

@ngodhaniQeleo
Copy link
Author

ngodhaniQeleo commented Feb 24, 2025

As for the actual error: if I had to guess, your app may not have permission to use protected customer data. Accessing it will return an error in that case. You can confirm if that's the case by removing all the customer properties except for id, which isn't protected.

We already having read_customers access scope permission. And Also if we remove customer object from Graph QL Query And also updated the library version from 6.22.0 to 6.22.1 but still it throws same error. See below code and error

Image

After executing above code I am facing below error. This error only comes IF I use variant object in Graph QL Query.
IF I am not using variant object then it will give successful order response.

Image

@nozzlegear nozzlegear linked a pull request Feb 24, 2025 that will close this issue
3 tasks
@ngodhaniQeleo
Copy link
Author

From when can I get this issue resolution from Shopify Sharp library?

@nozzlegear
Copy link
Owner

Hey @ngodhaniQeleo! I just published a new version of ShopifySharp to Nuget, version 6.22.2. I think it should fix the problem. Can you upgrade to that version and try your code again?

@ngodhaniQeleo
Copy link
Author

Hey @ngodhaniQeleo! I just published a new version of ShopifySharp to Nuget, version 6.22.2. I think it should fix the problem. Can you upgrade to that version and try your code again?

@nozzlegear Yes, After Upgrading to 6.22.2 version. It works very well for us without causing any problems. Thanks for support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants