Commit 6b2d94c
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- includes
- Blocks
- Data
- Field/BlockSupports
- GraphQL
- Type
- InterfaceType
- Scalar
- Utilities
12 files changed
+527
-622
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
41 | | - | |
| 39 | + | |
42 | 40 | | |
43 | 41 | | |
44 | 42 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments