Skip to content

Commit 6b2d94c

Browse files
chore: performance improvements for render_block and WPGraphQL 2.3.0 (#384)
* Refactored render_block to reduce overhead and callbacks. * Removed old patch file * Used static function for callback for descriptions See PR - wp-graphql/wp-graphql#3354 * Reverted static fn(), added by mistake and not complete. * Fixed PHPStan error. Added filter for graphql_wp_object_type_config tp lazy load config. Code from @justlevine * Removed core filter and added wp_graphql_content_blocks_register_config filter to lazy load the config * PHPCS Fixes. Renamed filter to wpgraphql_content_blocks_register_config * Removed filter and used a static function WPGraphQLRegisterConfig::resolve_graphql_config instead * Removed init call as not needed now. * Added TODO to remove WPGraphQLRegisterConfig::resolve_graphql_config once the plugin requires a min version of at least WPGraphQL 2.3.0 * Removed composer patches as we don't use this anymore. * Update includes/GraphQL/WPGraphQLRegisterConfig.php Co-authored-by: Dovid Levine <[email protected]> * Applied @justlevine suggestion on how to use the shim on per array rather than multidimensional array. * Added callbacks to descriptions. * Fixed PHPCS. * chore: make additional configs 2.3.0+ compatible (#387) --------- Co-authored-by: Dovid Levine <[email protected]>
1 parent 6d989ea commit 6b2d94c

File tree

12 files changed

+527
-622
lines changed

12 files changed

+527
-622
lines changed

composer.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
"minimum-stability": "dev",
77
"require": {
88
"php": ">=7.4",
9-
"imangazaliev/didom": "^2.0",
10-
"cweagans/composer-patches": "^1"
9+
"imangazaliev/didom": "^2.0"
1110
},
1211
"require-dev": {
1312
"brain/monkey": "^2.6",
@@ -37,8 +36,7 @@
3736
"config": {
3837
"allow-plugins": {
3938
"dealerdirect/phpcodesniffer-composer-installer": true,
40-
"phpstan/extension-installer": true,
41-
"cweagans/composer-patches": true
39+
"phpstan/extension-installer": true
4240
},
4341
"platform": {
4442
"php": "7.4"

composer.lock

Lines changed: 2 additions & 306 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)