wp-graphql-polylang icon indicating copy to clipboard operation
wp-graphql-polylang copied to clipboard

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

Open simplenotezy opened this issue 3 years ago • 1 comments

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.

simplenotezy avatar Nov 24 '21 09:11 simplenotezy

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

anacoelhovicente avatar Mar 22 '22 12:03 anacoelhovicente