-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Guest Account Checkout - Status 405 Not Allowed #222
Comments
Hello Guys, I have been able to nail this down to not an issue when creating the order, rather when querying the Checkout operation result. I still need to figure out which field in specific is causing the issue. If I query the resulting Order, then I get the error. |
If I remember correctly (saw this somewhere), order creation must be done with a user that has edit-post capability. |
@kvindasAB Make sure you have guest checkout enable in the WooCommerce settings and have implemented retrieved and stash the woocommerce session took to send with your GraphQL request. Here is an example with React/Apollo |
@kvindasAB any update on this issue? Please note that the versions of WPGraphQL and WooGraphQL you have listed in the issue summary above aren't compatible. |
@kidunot89 I need to update on this issue. After creating the issue I have updated to the latest versions of WPGraphQL and WooGraphQL, but can still replicate the issue. But also after doing that I found an issue on my payload query, which I still want to discard if might be the one creating the situation in the first place. But I still need a couple of days to confirm as I'm not on this project full time. Will get back to you guys confirming either way, if the problem continues or was an issue on my side. Will keep you posted. |
Guys I have not been able to check this. Thanks. |
@kvindasAB hey, is your WordPress site at If you visit |
Hello Jason,
No, I do have Wordpress in a cloud server, and I'm able to navigate the
schema remotely with GraphiQL or when using Gatsby.
I have not been able to confirm the source of the issue, but potentially it
is generated due to an error on the Graphql query of my side, but I need to
double check it.
…On Tue, Feb 18, 2020 at 8:54 AM Jason Bahl ***@***.***> wrote:
@kvindasAB <https://github.com/kvindasAB> hey, is your WordPress site at
localhost:8000? The error 405 appears to be from hitting a non-existing
URL with a POST request.
If you visit localhost:8000/graphql in your browser, what do you see?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#222?email_source=notifications&email_token=AAXBEQYA3JR4W7HTB2POOTLRDPZA5A5CNFSM4KM4BDB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMCIMUA#issuecomment-587499088>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXBEQ7R6IYJJIIMDY2U4YTRDPZA5ANCNFSM4KM4BDBQ>
.
|
Your screenshot shows that you're making requests to When using Gatsby, the Gatsby GraphQL API only exists during build time and shuts down when the build is complete. It's not a live API you can query at runtime. To make client-side GraphQL Queries/Mutations back to WordPress, you'll need to make the requests to the WordPress GraphQL API endpoint, not the Gatsby endpoint. |
Hello Jason,
That is correct, the request is being done to localhost:8000, but only
because when running Gatsby I'm also running a local proxy pointed to the
remote server.
But, I have tested other mutations and they are working properly, things
like requesting the current cart, or adding products to cart, all of those
are working fine.
…On Tue, Feb 18, 2020 at 9:03 AM Jason Bahl ***@***.***> wrote:
Your screenshot shows that you're making requests to
localhost:8000/graphql
When using Gatsby, the Gatsby GraphQL API only exists during build time
and shuts down when the build is complete. It's not a live API you can
query at runtime.
To make client-side GraphQL Queries/Mutations back to WordPress, you'll
need to make the requests to the WordPress GraphQL API endpoint, not the
Gatsby endpoint.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#222?email_source=notifications&email_token=AAXBEQ35LTNRLIYLSEA57KDRDP2DJA5CNFSM4KM4BDB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMCJQ6I#issuecomment-587503737>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXBEQ5VYKDRVY4IBVVDCCDRDP2DJANCNFSM4KM4BDBQ>
.
|
The error 405 that you're seeing, I believe, is an error you'll get when attempting a POST request against a non-existent endpoint. Which makes it seem, to me, that you're attempting to query an endpoint that may not actually exist. Could you share screenshots showing the requests to |
Describe the bug
Hello Guys, first of all, thanks a lot for this cool project.
I'm currently implementing a personal Ecom site with WooCommerce and using WpGraphql in the process.
I'm currently not supporting user accounts, and plan to only support Guest checkout.
Now on a guest session, when I execute the checkout method, I'm currently getting a 405 http status.
As far as I understood the
checkout
method should be the one called when trying to create a guest session order.I would like to see if I can get any guidance to understand if I'm currently either doing something wrong or how to diagnose the issue.
To Reproduce
Steps to reproduce the behavior:
addToCart
mutation.checkout
with all information (billing address, shipping address, shipping method, payment method) I get a405
http status.account
portion, as I'm not interested on creating a user account.mutationId
on my own with a uuid.Expected behavior
Order should be created and no 405 returned.
Screenshots
Additional context
WooGraphql: v0.3.1-beta
Wp-graphql: v0.3.4
The text was updated successfully, but these errors were encountered: