Hi I have the same error as Jose-Xu, Don't know when you made it, have you tried again? dev.to/qz135636665908/comment/oo7f
quote:
"Hi Isa, I actually found my issues, as I typed something wrong in my query_type.rb file. Thanks for made it clear that I should not have expect localhost:3000/graphql to work in the browser!"
I don't know what error he made in query_type.rb file but I checked it very well and I got it right!
can you check this problem ? thanks
Hi oTangVinhDuong! If I'm not mistaken, I believe Jose-Xu's problem was trying to access localhost:3000/graphql in a browser.
Since GraphQL relies on sending POST requests only, you will need to use a tool like Insomnia, Postman, or graphiql to view the query results.
To double-check everything is working, I just used Insomnia to send a POST request to localhost:3000/graphql/ using a GraphQL body with the following query:
query {
allOrders {
id
description
total
successfulPayments {
id
amount
status
}
}
}
I also confirmed that the query_type.rb file I used just now matches what is above--this is the code I just ran:
Hi I have the same error as Jose-Xu, Don't know when you made it, have you tried again?
dev.to/qz135636665908/comment/oo7f
quote:
"Hi Isa, I actually found my issues, as I typed something wrong in my query_type.rb file. Thanks for made it clear that I should not have expect localhost:3000/graphql to work in the browser!"
I don't know what error he made in query_type.rb file but I checked it very well and I got it right!
can you check this problem ? thanks
Hi oTangVinhDuong! If I'm not mistaken, I believe Jose-Xu's problem was trying to access localhost:3000/graphql in a browser.
Since GraphQL relies on sending POST requests only, you will need to use a tool like Insomnia, Postman, or graphiql to view the query results.
To double-check everything is working, I just used Insomnia to send a POST request to localhost:3000/graphql/ using a GraphQL body with the following query:
I also confirmed that the
query_type.rb
file I used just now matches what is above--this is the code I just ran:Let me know if you're still having issues, and I'll try to help as best I can! :)