Releases: AxeWP/wp-graphql-gravity-forms
v0.8.1 - `gform_pre_render` Support
This minor applies the gform_pre_render filter to GFUtils::get_form().
- feat: filter
GFUtils::get_form()bygform_pre_render(h/t @travislopes ). - dev: add
wp-graphql-stubsto composerdevDependencies.
v0.8.0 - Revamped GraphQL Connections
This release reworks all GraphQL connections, implementing data loaders, optimizing database queries, and adding support for more where args in more situations.
New Features
gravityFormsFormscan now be filtered by a list of form IDs.FormEntryconnections now have access to the followingwhereargs:status,dateFilters,fieldFilters,fieldFiltersMode.formFieldcan now be filtered by a list of field IDs,adminLabels, and the field type.- [Breaking] Full pagination support has been added to
FormsandEntries. Note: cursor generation has changed, so if you are manually generating form or entry cursors, you will need to update your code. - [Breaking]
FieldFiltersOperatorInputEnumnow supports all remaining Gravity Forms entry search operators, such asLIKE,IS,IS_NOT. TheGREATER_THANandLESS_THANoperators have been removed, as they are not supported by Gravity Forms.
Bugfixes
- Correctly handle
sourceUrlchanges insubmitGravityFormsFormandupdateGravityFormsDraftEntrymutations. wp_graphql_gf_can_view_entriesfilter now correctly passes$form_idsinstead of non-existent$entry_ids.fieldFiltersnow correctly search througharrayentry values.EntriesFieldFiltersInput.keyis now optional.
Under the Hood
- [Breaking] Bumped minimum GF version to v2.5.x.
- [Breaking] Connections have been completely refactored. The new classes are
EntryConnections,FieldConnectionsandFormConnections. - [Breaking]
RootQueryEntriesConnectionResolverandRootQueryFormsConnectionResolverclasses were renamed toEntriesConnectionsResolverandFormConnectionResolver. They now properly extendAbstractConnectionResolver. - Form connections now implement a
DataLoader. - Added
GFUtils::get_forms()for speedy requests from $wpdb. - Fixed various code smells.
- docs: Updated information about queries to reflect pagination and new
whereargs. - tests: WPUnit tests now extend
GFGraphQLTestCase. - tests: [Breaking]
WPGraphQLGravityForms\Testsnamespace has been renamed toTests\WPGraphQL\GravityForms.
v0.7.3 - WPGraphQL v1.6.x Compatibility
This release adds compatibility with WPGraphQL v1.6.x, and its new lazy/eager type loading.
- fix: Add
eagerlyLoadTypeproperty to WPGraphQL type registration. - fix: Hook type registration using
get_graphql_register_action(). - fix: Fix typo in
addressField.copyValueOptionsLabeltype definition. - fix: Check entry values before (unnecessarily) updating them in SubmitGravityFormsForm mutation.
- dev: Update composer dependencies.
- tests: Clear WPGraphQL schema before/after each test.
v0.7.2.1 - Hotfix
(Re-released, as the last one incorectly contained the old version.)
- Fixes bug where unset
formFieldsproperties would cause a type error forEnums. (h/t @natac13)
v0.7.1 - Bugfix
This release fixes the following bugs:
- fix: Prevents
UserErrorwhen filteringgravityFormsEntriesby a value in any field (i.e. whenfieldFilters.keyis"0").
v0.7.0 - File Uploads and Post Image Submissions 🚀🚀🚀
**
The big highlight in this release is experimental*** support for File Upload / Post Image submissions. We also added a feature that updates WordPress post meta when the corresponding Gravity Forms entry is updated.
We added some new WordPress filters, and changed the way some of our PHP classes work, to make it easier for people to add support for their own custom Gravity Forms fields.
We even gave the docs some love. We've added info about filters and using specific form field value inputs, and updated many of the example snippets. You can find the new documnetation in the repo's /docs folder.
Note: These changes did necessitate refactoring many of the plugin classes, so if you're extending any of them in your own projects, make sure to update your class methods!
***: File Uploads and Post Image submissions currently require WPGraphQL Upload to be installed and activated. Once WPGraphQL adds native support for multipart form requests, it is likely that these GraphQL input values will change.
New Features
- Added support for
FileUploadandPostImagefield value submissions. Ple - Updating Post field values in a Gravity Forms entry, now also updates the corresponding WordPress post. Not even native GF lets you do that!
- New WordPress filters:
wp_graphql_gf_type_config,wp_graphql_gf_connection_config.
Bugfixes
chainedSelectValuesinput is now only visible if the Chained Selects plugin is active.- The
EntryGraphQL type now implements thewp_graphql_gf_can_view_entriesfilter.
Under the Hood
- feat: add
altTexttoPostImagefield values. - feat: The
pageNumberfield is now available on allformFields. - dev:
AbstractEnum::set_values()has been deprecated in favor ofAbstractEnum::get_values(). - dev:
Button,LastPageButton,ConditionalLogic,ConditionalLogicRule,Entry,EntryForm,EntryUser,FieldError,Form,FormComfirmation,FormNotification,FormNotificationRouting,FormPagination,SaveAndContinue, now extend AbstractObject`. Their functions have changed accordingly. - dev: Added
GFUtils::get_gravity_forms_upload_dir()andGUtils::handle_file_upload(). - dev: Added
Utils::maybe_decode_json()andUtils::apply_filters. - dev: deprecated
wp_graphql_{$enumType}_valuesfilter, in favor ofwp_graphql_gf_{$enumType}_values. - dev: deprecated
wp_graphql_gf_field_typesfilter, as it no longer necessary to manually map GraphQL fields to GFformFields. - dev: deprecated
wp_graphql_gf_form_field_instancesandwp_graphql_gf_field_value_instancesfilters in favor ofwp_graphql_gf_instances. - dev: Deprecated the
adminOnly,allowsPrepopulatedandinputNamefields onPostImageField. - dev: Updated composer dependencies.
- dev!:
scr/connectionsnow extendAbstractConnection - dev!:
src\Types\Inputnow extendAbstractInput. Their functions have changed accordingly. - dev!: Class
AbstractFieldhas been deprecated in favor ofAbstractFormField. Its functions have changed accordingly. - dev!: Classes
AbstractProperty,AbstractFieldValuehave been deprecated in favor ofAbstractObject. Their functions have changed accordingly. - dev!: make plugin
$instancesstatic for easier access and extension. - dev!: The
Enum,InputType,ValuePropertyPHP interface has been deprecated. Please update your code. - dev!: The methods required by the
FieldValue,TypePHP interface have changed. Please update your code. - tests: Removed
testGetEnabledFieldTypesnow that we are usingstatic $instances.
v0.6.3 - Unit Tests
- Adds support for missing date formats (
dmy_dash,dmy_dot,ymd_slash,ymd_dash, andymd_dot). - Fix:
EmailInputPropertydescription updated. - Dev:
autocompleteAttributehas been deprecated onEmailInputProperty. - Tests: Added
updateEntryandupdateDraftEntrymutations to existingformFieldtests. - Tests: Add tests for CheckboxField, ConsentField, and DateField.
v0.6.2.2 - Hotfix
- Fixes
submitGravityFormsFormmutation not saving signature field value after v0.6.2.1.
v0.6.2.1 - Hotfix
- Fixes
updateGravityFormsEntrynot saving signature field value.
v0.6.2 - Bugfixes
v0.6.2 - Bugfixes
- Fixes
updateGravityFormsEntrymutation not propery saving complex field values (h/t @natac13 ) - Fixes mutations not correctly deleting old
SignatureFieldfiles from the server (h/t @natac13 ) - Fixes
SignatureFieldValues failing Gravity FormsisRequiredvalidation (h/t/ @natac13). - Fixes empty
formFields.layoutGridColumnSpanvalues not returning asnull. - Removes deprecation from
ChainedSelectInput.name. - Correctly sets
graphql_connection_max_query_amountto a minimum of600. AbstractMutation::prepare_field_value_by_type()no longer tries processing unrecognized fields.- Dev: Added filter
wp_graphql_gf_prepare_field_valuefor processing custom field values. - Dev: Added filter
wp_graphql_gf_field_value_typefor adding custom field value input types. - Dev: The arguments for
AbstractMutation::validate_field_value()have changed to no longer require passing the$form. Passing the old set of arguments may stop working in future versions of the plugin. - Tests: Added unit tests for
ChainedSelectfields and values.