Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: update connection resolvers #412

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

- feat!: Refactor `FormsConnectionResolver` and `EntriesConnectionResolver` for compatibility with WPGraphQL v1.26.0 improvements.
- chore!: Bump minimum WPGraphQL to v1.26.0
- chore: Update Composer dev-dependencies and fix test compatibility with `wp-graphql-test-case` v3.0.x.

## v0.12.6.1

This _patch_ release fixes the version number in the plugin header, which was incorrectly set to `0.12.5` instead of `0.12.6`.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Our hope for this open source project is that it will enable more teams to lever

* PHP 7.4-8.2+
* WordPress 5.4.1+
* WPGraphQL 1.9.0+
* WPGraphQL 1.26.0+
* Gravity Forms 2.5+ (Recommend: v2.6+)
* **Recommended**: [WPGraphQL Upload](https://github.com/dre1080/wp-graphql-upload) - used for [File Upload and Post Image submissions](docs/submitting-forms.md).

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"codeception/phpunit-wrapper": "^9.0",
"codeception/util-universalframework": "^1.0",
"lucatume/wp-browser": "<3.5",
"wp-graphql/wp-graphql-testcase": "~2.3",
"wp-graphql/wp-graphql-testcase": "~3.0.1",
"phpunit/phpunit": "^9.0",
"phpstan/phpstan": "^1.2",
"phpstan/extension-installer": "^1.1",
Expand Down
641 changes: 372 additions & 269 deletions composer.lock

Large diffs are not rendered by default.

23 changes: 9 additions & 14 deletions docs/actions-and-filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,13 @@ apply_filters( 'graphql_gf_can_view_entries', bool $can_view_entries, int $form_
Filter the Submitted Entry's $query_args to allow folks to customize queries programmatically.

```php
apply_filters( 'graphql_gf_entries_connection_query_args', array $query_args, mixed $source, array $args, AppContext $context, ResolveInfo $info );
apply_filters( 'graphql_gf_entries_connection_query_args', array $query_args, \WPGraphQL\GF\Data\Connection\EntriesConnectionResolver $resolver );
```

#### Parameters

* **`$query_args`** _(array)_ : The query args that will be passed to `GF_Query`.
* **`$source`** _(mixed)_ : The source passed down the Resolve Tree.
* **`$args`** _(array)_ : Array of arguments input in the field as part of the GraphQL query.
* **`$context`** _(AppContext)_ : Object passed down the GraphQL tree.
* **`$info`** _(ResolveInfo)_ : The ResolveInfo passed down the GraphQL tree.
* **`$query_args`** _(array<string,mixed>)_ : The query args that will be passed to `GF_Query`.
* **`$resolver`** _(WPGraphQL\GF\Data\Connection\EntriesConnectionResolver)_ : The resolver object.

### `graphql_gf_field_value_input_class`

Expand Down Expand Up @@ -234,16 +231,13 @@ apply_filters( 'graphql_gf_field_value_input_prepared_value', array|string $prep
Filter the Form $query_args to allow folks to customize queries programmatically.

```php
apply_filters( 'graphql_gf_forms_connection_query_args', array $query_args, mixed $source, array $args, AppContext $context, ResolveInfo $info );
apply_filters( 'graphql_gf_forms_connection_query_args', array $query_args, \WPGraphQL\GF\Data\Connection\FormsConnectionResolver $resolver );
```

#### Parameters

* **`$query_args`** _(array)_ : The query args that will be passed to `GFAPI::get_forms()`.
* **`$source`** _(mixed)_ : The source passed down the Resolve Tree.
* **`$args`** _(array)_ : Array of arguments input in the field as part of the GraphQL query.
* **`$context`** _(AppContext)_ : Object passed down the GraphQL tree.
* **`$info`** _(ResolveInfo)_ : The ResolveInfo passed down the GraphQL tree.
* **`$query_args`** _(array<string,mixed>)_ : The query args that will be passed to `GFAPI::get_forms()`.
* **`$resolver`** _(\WPGraphQL\GF\Data\Connection\FormsConnectionResolver)_ : The resolver object.

### `graphql_gf_form_field_child_types`

Expand Down Expand Up @@ -402,12 +396,13 @@ apply_filters( 'graphql_gf_form_fields_name_map', array $fields_to_map );
Filter to modify the form data before it is sent to the client. This hook is somewhat similar to GF's `gform_pre_render` hook, and can be used for dynamic field input population among other things.

```php
apply_filters( 'graphql_gf_form_object', array $form );
apply_filters( 'graphql_gf_form_object', array $form, \WPGraphQL\GF\Data\Connection\FormsConnectionResolver $resolver );
```

#### Parameters

* **`$form`** _(array)_ : The GF [Form object](https://docs.gravityforms.com/form-object/).
* **`$form`** _(array<string,mixed>)_ : The GF [Form object](https://docs.gravityforms.com/form-object/).
* **`$resolver`** _(\WPGraphQL\GF\Data\Connection\FormsConnectionResolver)_ : The resolver object.

### `graphql_gf_gatsby_enabled_actions`

Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Requires at least: 5.4.1
Tested up to: 6.5
Requires PHP: 7.4
Requires Gravity Forms: 2.5.0
Requires WPGraphQL: 1.9.0
Requires WPGraphQL: 1.26.0
Stable tag: 0.12.6.1
Maintained at: https://github.com/axewp/wp-graphql-gravity-forms
License: GPL-3
Expand Down
Loading
Loading