We should leave the NodeWithSeo interface to use the RankMathSeo type, but for all direct connections we should resolve straight to the object. This would reduce complexity on both the query and implementation (i.e. graphql-Codegen) side of this.
[!important]
This may be a breaking change to implement.
Steps to reproduce
query UserSeo( $id: ID! ) {
user( id: $id, idType: DATABASE_ID ){
databaseId
seo {
fullHead
# this should not be necessary 👇
... on RankMathUserSeo {
additionalProfiles
facebookProfileUrl
twitterUserName
}
}
}
Additional context
No response
Plugin Version
0.1.0
WordPress Version
6.4.3
WPGraphQL Version
1.22.0
RankMath SEO Version
1.215.1
Additional enviornmental details
No response
Please confirm that you have searched existing issues in the repo.
[X] Yes
Please confirm that you have disabled ALL plugins except for RankMath SEO, WPGraphQL, and WPGraphQL for Rank Math
Description
Currently
${objectType}.seo
is typed asRankMathSeo
instead ofRankMath${ObjectType}Seo
.This requires you to unnecessarily drill down the interface, like in https://github.com/AxeWP/wp-graphql-rank-math/pull/76/commits/53efda569ee0796a120b127aa66d77da7dffd5e5
We should leave the
NodeWithSeo
interface to use theRankMathSeo
type, but for all direct connections we should resolve straight to the object. This would reduce complexity on both the query and implementation (i.e. graphql-Codegen) side of this.Steps to reproduce
Additional context
No response
Plugin Version
0.1.0
WordPress Version
6.4.3
WPGraphQL Version
1.22.0
RankMath SEO Version
1.215.1
Additional enviornmental details
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have disabled ALL plugins except for RankMath SEO, WPGraphQL, and WPGraphQL for Rank Math