You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
WPGraphQL v0.4.0 (upcoming) introduces some breaking changes to the TypeRegistry.
WPGraphQL for ACF will need some updates to play nice with the core WPGraphQL update.
The update to WPGraphQL v0.4.0 enables the GraphQL Schema to be cleared properly, enabling better integration tests with Codeception, which will severely increase the code quality of the core plugin and extensions such as ACF.
The changes needed for this extension to play nice are pretty minor:
Hook the main Config to init_graphql_type_registry instead of graphql_register_types
Have the Config class accept TypeRegistry as an argument, and set it in the class as a class var
Replace instances of TypeRegistry:: static method calls with $this->type_registry (using the ^ instance passed into the class)
Replace the resolveType methods to use the type_registry passed to the class instead of static Types:: methods
Refactor tests to be more granular (the result and primary goal of the new WPGraphQL::__clear_schema() ability). . .now tests can be MUCH more granular, readable, and maintainable, instead of registering everything all up front, individual tests can register exactly what they need!
The text was updated successfully, but these errors were encountered:
WPGraphQL v0.4.0 (upcoming) introduces some breaking changes to the TypeRegistry.
WPGraphQL for ACF will need some updates to play nice with the core WPGraphQL update.
The update to WPGraphQL v0.4.0 enables the GraphQL Schema to be cleared properly, enabling better integration tests with Codeception, which will severely increase the code quality of the core plugin and extensions such as ACF.
The changes needed for this extension to play nice are pretty minor:
init_graphql_type_registry
instead ofgraphql_register_types
TypeRegistry::
static method calls with$this->type_registry
(using the ^ instance passed into the class)Types::
methodsWPGraphQL::__clear_schema()
ability). . .now tests can be MUCH more granular, readable, and maintainable, instead of registering everything all up front, individual tests can register exactly what they need!The text was updated successfully, but these errors were encountered: