|
2 | 2 |
|
3 | 3 | ## [Unreleased] |
4 | 4 |
|
5 | | -- feat!: Implement `FormField` model and `DataLoader`, and refactor `FormFieldsConnectionResolver` to extend `AbstractConnectionResolver`. |
6 | | -- feat!: Refactor `FormsConnectionResolver` and `EntriesConnectionResolver` for compatibility with WPGraphQL v1.26.0 improvements. |
7 | | -- feat!: Narrow `FormField.choices` and `FormField.inputs` field types to their implementations. |
8 | | -- feat: Add `targetPageNumber` and `targetPageFormFields` to `SubmitGfFormPayload` for better multi-page form support. |
9 | | -- fix!: Keep `PageField` with previous page data when filtering `formFields` by `pageNumber`. H/t @SamuelHadsall . |
10 | | -- fix: Handle RadioField submission values when using a custom "other" choice. H/t @Gytjarek . |
| 5 | +## v0.13.0 |
| 6 | + |
| 7 | +**:warning: This release contains multiple breaking changes.** |
| 8 | + |
| 9 | +This _major_ release leverages new WPGraphQL v1.26 features to enhance our schema and resolvers. The `FormsConnectionResolver` and `EntriesConnectionResolver` have been refactored to take advantage of upstream API changes, and a new `FormField` model, `Dataloader`, and `ConnectionResolver` is used to boost performance and flexibility. The schema DX by narrowing down types from their interfaces, we've adding other new features, bug fixes, and code quality improvements. |
| 10 | + |
| 11 | +In this release, we've also removed the `vendor` directory from the GitHub repository. If you have been downloading the plugin's source code instead of the release zip, you will need to run `composer install` to install the required dependencies. |
| 12 | + |
| 13 | +**Note:** As a result of these changes, the following minimum versions have been bumped: |
| 14 | +- WPGraphQL: v1.26.0 |
| 15 | +- WordPress: v6.0.0 |
| 16 | +- Gravity Forms: v2.7.0 |
| 17 | + |
| 18 | +### What's New: |
| 19 | + |
| 20 | +- We've added support for the Gravity Forms Block when using WPGraphQL Content Blocks, by exposing the `GfForm` on the `GravityformsFormAttributes.form` field. |
| 21 | + |
| 22 | +- We've implemented a complete `Model`->`Dataloader`->`ConnectionResolver` pattern for Form Fields. As a result resolving form field data is significantly more performant and flexible, and our FormField connections are fully Relay compliant. |
| 23 | + - **🚨 Breaking**: The deprecated (int) `FormField.id` has been reinstated as a relay-compliant `ID`. If you are still using `id` as the integer database ID, you will need to update your queries to use `FormField.databaseId`. |
| 24 | + - **🚨 Breaking**: Form Field resolvers now return a `FormField` model instead of the underlying form. While you can update your custom resolvers to access the underlying form via `$source->gfForm`, it's recommended to rely on the `Model`'s fields for better performance and reliability. |
| 25 | + - Thanks to the new dataloader, we can now more easily and scalably resolve `FormField`s in more places in the schema. In this release we have: |
| 26 | + - Added the `FieldError.connectedFormField` field. |
| 27 | + - Deprecated (int) `GfFieldWithProductFieldSetting.productField` in favor of `.connectedProductField`. |
| 28 | + - Updated our existing `.connectedFormField`s across the schema to use the new Dataloader. |
| 29 | + - Exposed `SubmitGfFormPayload.targetPageFormFields` to help with multi-page form support. See notes below for more information. |
| 30 | + |
| 31 | +- **🚨 Breaking**: We've improved the DX for `FormField.choices` and `.inputs` by narrowing down the field definitions on the implementing Types. For example, instead of `CheckboxField.choices` resolving to a generic `GfFieldChoice` interface, it now resolves directly to `CheckboxFieldChoice. |
| 32 | + |
| 33 | + **Note**: If your queries are checking for "impossible" interfaces, (e.g. `... on ListFieldChoice` on a `CheckboxField.choices` query), you will need to update your queries. A full list of breaking schema changes can be found below. |
| 34 | + |
| 35 | + |
| 36 | +- We've improved the DX and handling of multi-page forms: |
| 37 | + - **🚨 Breaking**: `PageField`s are now paginated to be at the _bottom of the previous page_, instead of at the top of the following page. H/t @SamuelHadsall. |
| 38 | + |
| 39 | + **Note**: If you are currently working around the old pagination on your frontend (e.g. overfetching and post-processing your `formFields`), you may need to update your code. |
| 40 | + |
| 41 | + - We've added `targetPageNumber` and `targetPageFormFields` to the `SubmitGfFormPayload` to help with multi-page form support, allowing you to fetch, submit, and validate a single page at a time before navigating to the next page. Check out the updated docs for more information and usage. |
| 42 | + |
| 43 | +- **🚨 Breaking**: We've refactored the `EntriesConnectionResolver` and `FormsConnectionResolver` classes to use the new API methods available as of WPGraphQL v1.26.0, leading to improved performance and reliability. |
| 44 | + |
| 45 | + **Note**: If you are extending these classes in your custom code, you will need to update your code to match the new method signatures. |
| 46 | + |
| 47 | +- **🚨 Breaking**: We've removed the following _deprecated_ code. If you are still referencing these in your GraphQL queries or custom PHP, you will need to update your code: |
| 48 | + - Deprecated GraphQL fields: `FormsConnectionOrderbyInput.field`, `GfFieldWithDisableQuantitySetting.isQuantityDisabled`. `GfSubmittedEntry.entryId`. `GfForm.button`, `gfForm.entryId`, `gfForm.lastPageButton`. |
| 49 | + - Deprecated hooks: `graphql_gf_form_modeled_data_experimental`, `graphql_gf_form_field_setting_properties`, `graphql_gf_form_field_value_properties`. |
| 50 | + - Deprecated helper methods: `GFUtils::handle_file_upload()`. |
| 51 | + |
| 52 | +### Breaking Schema Changes |
| 53 | +- Field `FormField.id` changed type from `Int!` to `ID!` |
| 54 | +- Field `{$TYPE}Field.inputs` changed type from `[GfFieldInput]` to `[{$TYPE}InputProperty]` |
| 55 | +- Field `{$TYPE}Field.choices` changed type from `[GfFieldChoice]` to `[{$TYPE}FieldChoice]` |
| 56 | +- Field `values` (deprecated) was removed from object type `FileUploadField` |
| 57 | +- Input field `field` (deprecated) was removed from input object type `FormsConnectionOrderbyInput` |
| 58 | +- Field `isQuantityDisabled` (deprecated) was removed from interface `GfFieldWithDisableQuantitySetting` |
| 59 | +- Field `button` (deprecated) was removed from object type `GfForm` |
| 60 | +- Field `formId` (deprecated) was removed from object type `GfForm` |
| 61 | +- Field `lastPageButton` (deprecated) was removed from object type `GfForm` |
| 62 | +- Field `entryId` (deprecated) was removed from object type `GfSubmittedEntry` |
| 63 | + |
| 64 | +### Fixes |
| 65 | +- fix: Add missing descriptions to various GraphQL types. |
11 | 66 | - fix: Check for Submission Confirmation url before attempting to get the associated post ID. |
12 | 67 | - fix: Flush static Gravity Forms state between multiple calls to `GFUtils::submit_form()`. |
13 | | -- fix: Add missing descriptions to types. |
14 | | -- feat: Add `FieldError.connectedFormField` connection to `FieldError` type. |
15 | | -- feat: Add support for WPGraphQL Content Blocks. |
16 | | -- feat: Add `GfFieldWithProductFieldSetting.connectedProductField` connection and deprecate `.productField` field. |
17 | | -- dev: Remove `vendor` directory from the GitHub repository. |
18 | | -- dev: Use `FormFieldsDataLoader` to resolve fields instead of instantiating a new `Model`. |
19 | | -- dev: use WP_Filesystem to handle Signature field uploads. |
20 | | -- chore!: Remove deprecated fields from the schema: `FormsConnectionOrderbyInput.field`, `GfFieldWithDisableQuantitySetting.isQuantityDisabled`. `GfSubmittedEntry.entryId`. `GfForm.button`, `gfForm.entryId`, `gfForm.lastPageButton`. |
21 | | -- chore!: Remove deprecated hooks: `graphql_gf_form_modeled_data_experimental`, `graphql_gf_form_field_setting_properties`, `graphql_gf_form_field_value_properties`. |
22 | | -- chore!: Remove deprecated helper method: `GFUtils::handle_file_upload()`. |
23 | | -- chore: Add iterable type hints. |
24 | | -- chore!: Bump minimum WPGraphQL version to v1.26.0. |
25 | | -- chore!: Bump minimum WordPress version to v6.0.0. |
26 | | -- chore!: Bump minimum Gravity Forms version to v2.7.0. |
27 | | -- chore: Update PHP interfaces and Abstract classes with better type hints. |
28 | | -- chore: Declare `strict_types` in all PHP files. |
| 68 | +- fix: Handle `RadioField` submission values when using a custom "other" choice. H/t @Gytjarek . |
| 69 | + |
| 70 | +### Behind the Scenes |
| 71 | +- dev: Add new `graphql_gf_activate` and `graphql_gf_deactivate` actions. |
| 72 | +- dev: Deprecate `FieldValues::is_field_and_entry()` and remove internal usage. |
| 73 | +- dev: Remove `vendor` directory from the GitHub repository, and improve plugin initialization and autoload handling. |
| 74 | +- dev: use `WP_Filesystem` to handle Signature field uploads. |
| 75 | +- chore: Declare `strict_types` in all PHP files, add type hints to all iterable types. and fix exposed type errors. |
29 | 76 | - chore: Update Composer dev-dependencies and fix test compatibility with `wp-graphql-test-case` v3.0.x. |
30 | | -- docs: Add docs on using Multi-page forms. |
| 77 | +- chore: Update PHP interfaces and Abstract classes with better type hints. |
| 78 | +- chore!: Bump minimum Gravity Forms version to v2.7.0. |
| 79 | +- chore!: Bump minimum WordPress version to v6.0.0. |
| 80 | +- chore!: Bump minimum WPGraphQL version to v1.26.0. |
31 | 81 | - tests: Add test for `GFUtils::get_last_form_page()`. |
32 | 82 |
|
| 83 | + |
33 | 84 | ## v0.12.6.1 |
34 | 85 |
|
35 | 86 | This _patch_ release fixes the version number in the plugin header, which was incorrectly set to `0.12.5` instead of `0.12.6`. |
|
0 commit comments