Skip to content

Commit

Permalink
Merge branch 'develop' into feat/experiments-api
Browse files Browse the repository at this point in the history
  • Loading branch information
justlevine committed Jun 4, 2024
2 parents d125d50 + 30ee148 commit e1d2ff0
Show file tree
Hide file tree
Showing 65 changed files with 2,306 additions and 1,109 deletions.
7 changes: 4 additions & 3 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ phpstan.neon.dist
phpunit.xml.dist
README.md
schema.graphql



webpack.config.js
phpcs.xml.dist
.wp-env.json
.codeclimate.yml
33 changes: 0 additions & 33 deletions .gitattributes

This file was deleted.

43 changes: 42 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
# Changelog

= 1.26.0 =

## New Features

- [#3125](https://github.com/wp-graphql/wp-graphql/pull/3125): refactor: improve query handling in AbstractConnectionResolver
- new: `graphql_connection_pre_get_query` filter
- new: `AbstractConnectionResolver::is_valid_query_class()`
- new: `AbstractConnectionResolver::get_query()`
- new: `AbstractConnectionResolver::get_query_class()`
- new: `AsbtractConnectionResolver::query_class()`
- new: `AbstractConnectionResolver::$query_class`
- [#3124](https://github.com/wp-graphql/wp-graphql/pull/3124): refactor: split `AbstractConnectionResolver::get_args()` and `::get_query_args()` into `::prepare_*()` methods
- [#3123](https://github.com/wp-graphql/wp-graphql/pull/3123): refactor: split `AbstractConnectionResolver::get_ids()` into `::prepare_ids()`
- [#3121](https://github.com/wp-graphql/wp-graphql/pull/3121): refactor: split `AbstractConnectionResolver::get_nodes()` and `get_edges()` into `prepare_*()` methods
- [#3120](https://github.com/wp-graphql/wp-graphql/pull/3120): refactor: wrap `AbstractConnectionResolver::is_valid_model()` in `::get_is_valid_model()`

### Chores / Bugfixes

- [#3125](https://github.com/wp-graphql/wp-graphql/pull/3125): refactor: improve query handling in AbstractConnectionResolver
- Implement PHPStan Generic Type
- Update generic Exceptions to InvariantViolation
- [#3127](https://github.com/wp-graphql/wp-graphql/pull/3127): chore: update references to the WPGraphQL Slack Community to point to the new WPGraphQL Discord community instead.
- [#3122](https://github.com/wp-graphql/wp-graphql/pull/3122): chore: relocate `AbstractConnectionResolver::is_valid_offset()` with other abstract methods.
-
## 1.25.0

### Upgrade Notice

This release includes a fix to a regression in the v1.24.0. Users impacted by the regression in 1.24.0 included, but are not necessarily limited to, users of the WPGraphQL for WooCommerce extension.

### New Features

- [#3104](https://github.com/wp-graphql/wp-graphql/pull/3104): feat: add `AbsractConnectionResolver::pre_should_execute()`. Thanks @justlevine!

### Chores / Bugfixes
- [#3104](https://github.com/wp-graphql/wp-graphql/pull/3104): refactor: `AbstractConnectionResolver::should_execute()` Thanks @justlevine!
- [#3112](https://github.com/wp-graphql/wp-graphql/pull/3104): fix: fixes a regression from v1.24.0 relating to field arguments defined on Interfaces not being properly merged onto Object Types that implement the interface. Thanks @kidunot89!
- [#3114](https://github.com/wp-graphql/wp-graphql/pull/3114): fix: node IDs not showing in the Query Analyzer / X-GraphQL-Keys when using DataLoader->load_many()
- [#3116](https://github.com/wp-graphql/wp-graphql/pull/3116): chore: Update WPGraphQLTestCase to v3. Thanks @kidunot89!


## 1.24.0

### Upgrade Notice
Expand All @@ -10,7 +51,7 @@ The AbstractConnectionResolver has undergone some refactoring. Some methods usin
- `getContext` -> `get_context`
- `getInfo` -> `get_info`
- `getShouldExecute` -> `get_should_execute`
- `getLoader` -> `getLoader`
- `getLoader` -> `get_loader`

### New Features

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Below are some links to help you get started with WPGraphQL
- <a href="https://wpgraphql.com/docs/quick-start" target="_blank">Quick Start Guide</a>
- <a href="https://wpgraphql.com/docs/intro-to-graphql" target="_blank">Intro to GraphQL</a>
- <a href="https://wpgraphql.com/docs/intro-to-wordpress" target="_blank">Intro to WordPress</a>
- <a href="https://join.slack.com/t/wp-graphql/shared_invite/zt-3vloo60z-PpJV2PFIwEathWDOxCTTLA" target="_blank">Join the WPGraphQL community on Slack</a>
- <a href="https://discord.gg/AGVBqqyaUY" target="_blank">Join the WPGraphQL community on Discord</a>

-----

Expand Down
11 changes: 6 additions & 5 deletions access-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ function graphql_format_type_name( $type_name ) {
return str_replace( ' ', '', ucfirst( ucwords( $formatted_type_name ) ) );
}


/**
* Provides a simple way to run a GraphQL query without posting a request to the endpoint.
*
Expand Down Expand Up @@ -625,7 +624,6 @@ static function ( TypeRegistry $type_registry ) use ( $type_name, $field_name )
);
}


/**
* Given a Connection Name, this removes the connection from the Schema
*
Expand Down Expand Up @@ -815,21 +813,24 @@ static function ( \WPGraphQL\Admin\Settings\SettingsRegistry $registry ) use ( $
* @since 0.13.0
*/
function get_graphql_setting( string $option_name, $default_value = '', $section_name = 'graphql_general_settings' ) {
$section_fields = get_option( $section_name );
$section_fields = get_option( $section_name, [] );

/**
* Filter the section fields
*
* @param array<string,mixed> $section_fields The values of the fields stored for the section
* @param string $section_name The name of the section
* @param mixed $default_value The default value for the option being retrieved
*/
$section_fields = apply_filters( 'graphql_get_setting_section_fields', $section_fields, $section_name, $default_value );

// ensure the filtered sections fields are an array before proceeding
$section_fields = is_array( $section_fields ) ? $section_fields : [];

/**
* Get the value from the stored data, or return the default
*/
$value = isset( $section_fields[ $option_name ] ) ? $section_fields[ $option_name ] : $default_value;
$value = $section_fields[ $option_name ] ?? $default_value;

/**
* Filter the value before returning it
Expand Down
2 changes: 1 addition & 1 deletion build/app.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('react', 'react-dom', 'wp-element', 'wp-hooks'), 'version' => '878a79f97bdc86d6e199');
<?php return array('dependencies' => array('react', 'react-dom', 'wp-element', 'wp-hooks'), 'version' => '81f173f818f820506c81');
2 changes: 1 addition & 1 deletion build/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"php-coveralls/php-coveralls": "^2.5",
"slevomat/coding-standard": "^8.9",
"szepeviktor/phpstan-wordpress": "~1.3.0",
"wp-graphql/wp-graphql-testcase": "~2.3",
"wp-graphql/wp-graphql-testcase": "^3.0",
"wp-cli/wp-cli-bundle": "^2.8"
},
"config": {
Expand Down
Loading

0 comments on commit e1d2ff0

Please sign in to comment.