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

dev: use WooGraphQL 0.18.2 for LoginPayload fields #91

Merged
merged 4 commits into from
Oct 15, 2023

Conversation

kidunot89
Copy link
Contributor

@kidunot89 kidunot89 commented Oct 15, 2023

What

This PR defers the registration of LoginPayload.customer to WooGraphQL in v0.18.2+ (tba) which has added explicit support for this plugin.
Similarly, LoginPayload.wooSessionToken has been deprecated in favor of the sessionToken that WooGraphQL creates (and adds in v0.18.2+)

Why

Ecosystem interoperability.

How

Testing Instructions

Additional Info

Checklist:

  • My code is tested to the best of my abilities.
  • My code follows the WordPress Coding Standards.
  • My code has proper inline documentation.
  • I have added unit tests to verify the code works as intended.
  • I included the relevant changes in CHANGELOG.md

@justlevine
Copy link
Member

@kidunot89 if I understood the intent of this PR, it's to allow WooGraphQL to handle the registration of the customer and sessionToken fields.

However, it doesn't look like it's working with the latest WooGraphQL.
image

I believe this is because WooGraphQL only adds the fields to LoginPayload if WPGraphQL JWT Authentication exists.

@justlevine justlevine changed the title fix: Removes colliding field definitions and make "LoginPayload" compatible with WooGraphQL. dev: use WooGraphQL 0.18.2 for LoginPayload fields Oct 15, 2023
@coveralls
Copy link

coveralls commented Oct 15, 2023

Coverage Status

coverage: 82.646% (-0.2%) from 82.826% when pulling 1911066 on kidunot89:fix/woographql-conflicts-fix into 6a7e6c8 on AxeWP:develop.

Copy link
Member

@justlevine justlevine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kidunot89 I've updated the code to be backwards compatible with WooGraphQL < 0.18.2, as discussed.

I'm ready to merge unless you have any additional feedback.

@justlevine justlevine merged commit f2c35ff into AxeWP:develop Oct 15, 2023
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants