AxeWP / wp-graphql-headless-login

A WordPress plugin that provides Headless login and authentication for WPGraphQL, supporting traditional passwords, OAuth2/OpenID Connect, JWT, and more.
GNU General Public License v3.0
66 stars 11 forks source link

fix: get `User` model when resolving custom user type #36

Closed justlevine closed 1 year ago

justlevine commented 1 year ago

What

Tries to coerce non-core Models into a Model\User when resolving for AuthenticationData

Why

Fixes an oversight in #30 : The WooGraphQL customer model doesn't extend the User, and this generic shim seems like the best approach to supporting other custom types defined by the graphql_login_user_types filter.

How

Testing Instructions

Additional Info

Checklist:

coveralls commented 1 year ago

Coverage Status

Coverage: 61.707% (-0.08%) from 61.79% when pulling 591d0253d3b102deb8f371bf71a42d606eebf3e5 on justlevine:fix/woo-user-model into da3a33f80f84dd18fdfc1dc388f7be1aaf6d54c0 on AxeWP:develop.