You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your work on this. It's been very useful.
As I understand it, ProductService has been depreciated and I will need to move over to GraphQL going forward.
I am working on moving my code over to GraphQL, but I'm getting a 404 error when I use the sample code. The issue is happening at the PostAsync call, returning a '404 Not Found' HttpException.
I am able to use the following code to retreive all products from our store without issue: var productService = new ProductService(shopifyUrl, apiToken)
When I use the sample code, it does not work:
var graphService = new GraphService(shopifyUrl, apiToken);
var graphRequest = new GraphRequest
{
Query =
"""
query {
products(first: 3, query: "status:ACTIVE") {
pageInfo {
startCursor
endCursor
hasNextPage
hasPreviousPage
}
nodes {
id
# Get the product's REST Id too
legacyResourceId
title
handle
hasOnlyDefaultVariant
variantsCount {
count
}
}
}
}
""",
}
var graphResult = await graphService.PostAsync<Shopify_API_Classes.ListProductsResult>(graphRequest)
I have verified that my shopifyUrl variable is the *.myshopify.com url, as was noted in the Wiki.
Do you see something I may be missing here?
Thanks!
The text was updated successfully, but these errors were encountered:
Hey @jeleleven! Did you get this working yet? I don't see anything wrong with it at first glance. The GraphQL API endpoint doesn't typically return a 404 status code for normal operations, even if a resource doesn't exist. Instead it would return an error message with a 200 OK status code. The 404 suggests that something is wrong with the Shopify URL itself – is it possible there's a typo?
Hey @jeleleven! Did you get this working yet? I don't see anything wrong with it at first glance. The GraphQL API endpoint doesn't typically return a 404 status code for normal operations, even if a resource doesn't exist. Instead it would return an error message with a 200 OK status code. The 404 suggests that something is wrong with the Shopify URL itself – is it possible there's a typo?
I don't believe there's anything wrong with the shopify URL since it works with ProductService.
Uh oh!
There was an error while loading. Please reload this page.
Hello @nozzlegear,
Thank you for your work on this. It's been very useful.
As I understand it, ProductService has been depreciated and I will need to move over to GraphQL going forward.
I am working on moving my code over to GraphQL, but I'm getting a 404 error when I use the sample code. The issue is happening at the PostAsync call, returning a '404 Not Found' HttpException.
I am able to use the following code to retreive all products from our store without issue:
var productService = new ProductService(shopifyUrl, apiToken)
When I use the sample code, it does not work:
I have verified that my shopifyUrl variable is the *.myshopify.com url, as was noted in the Wiki.
Do you see something I may be missing here?
Thanks!
The text was updated successfully, but these errors were encountered: