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

Argument 1 passed to WPGraphQL\\Extensions\\Polylang\\PostObject::WPGraphQL\\Extensions\\Polylang\\{closure}() must be an instance of WPGraphQL\\Model\\Post, instance of WPGraphQL\\Model\\PostType given #64

Open
simplenotezy opened this issue Nov 24, 2021 · 1 comment

Comments

@simplenotezy
Copy link

simplenotezy commented Nov 24, 2021

I am getting this error, not sure if it is related:

Argument 1 passed to WPGraphQL\\Extensions\\Polylang\\PostObject::WPGraphQL\\Extensions\\Polylang\\{closure}() must be an instance of WPGraphQL\\Model\\Post, instance of WPGraphQL\\Model\\PostType given, called in /Users/mf/Projects/myproject/wp-content/plugins/wp-graphql/src/Utils/InstrumentSchema.php on line 151

Happened after adding:

translations {
	link
	language {
		locale
	}
}

To my page query.

@anacoelhovicente
Copy link

@simplenotezy was getting this error as well when querying a non-existing page.
Updating wp-graphql to 1.7.2 fixed it for me.

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

No branches or pull requests

2 participants