Skip to content

Releases: AxeWP/wp-graphql-gravity-forms

v0.10.0.1 - Hotfix

15 Jan 23:54
cecbd53
Compare
Choose a tag to compare

This hotfix release fixes compatibility issues with gatsby-source-wordpress introduced in the previous release and WPGraphQL v1.6.11.

  • fix: don't reregister duplicate generated {type}FieldChoice and {type}InputProperty object types.
  • dev: Field type on interface FormField was changed from FormFieldTypeEnum! to FormFieldTypeEnum, since gatsby-source-wordpress doesn't support non-nullable Enums (h/t @sarah-wfaa).

v0.9.2.1 - Hotfix

09 Jan 13:08
Compare
Choose a tag to compare

This hotfix release fixes an issue where EntryUser would throw an error if the WordPress user who submitted the entry no longer exists. The field now resolves to null instead.

  • fix: resolve missing EntryUser to [] instead of throwing UserError

v0.10.0 - Major Plugin & Schema Refactor

01 Jan 23:24
dcbed68
Compare
Choose a tag to compare

⚠️ This release contains multiple breaking changes.

This major release is a refactor the entire plugin in preparation for v1.0. GraphQL fields and types have been renamed and reorganized, the codebase is following ecosystem best practices, WP Actions and Filters have been changed to make it easier than ever, and dozens of performance enhancements have been made under the hood.

We expect this release to be the last major breaking release before v1.0. While we can't make any promises, we don't expect to make any more breaking changes to the GraphQL schema beyond those necessary for bug fixes.

What's new

  • 🚨 Breaking: Gravity Forms form fields are now autoregistered to the GraphQL schema using their registered GF field settings. That means all form fields (including custom fields) are implictly supported. For development purposes, certain core fields are hidden behind the WPGRAPHQL_GF_EXPERIMENTAL_FIELDS PHP constant. Learn more.
    Note: As a result of this change, the available fields on by the FormField interface and on individual Form field objects have changed.
  • 🚨 Breaking: Complex Gravity Forms form fields now inherit the properties of their parent $inputTypes. Form fields that can resolve to multiple types are now registed as GraphQL Interfaces (e.g. PostCategoryField), with their child types as GraphQL objects ( e.g. PostCategoryCheckboxField ).
  • 🚨 Breaking: GraphQL objects and fields have been renamed to be self documenting and prevent naming conflicts. Many fields have also been grouped into new GraphQL objects to improve DX and harden against future breaking schema changes. This is equally true for mutation inputs and payloads.
  • 🚨 Breaking: We've replaced the use of gravityForms in the schema with the gf shorthand for improved dx. gravityFormsForms are now gfForms, updateGravityFormsEntry is now updateGfEntry, etc.
  • 🚨 Breaking: Gravity Forms entries and draft entries now inherit the gfEntry interface, and use the GfSubmittedEntry and GfDraftEntry object types.
  • 🚨 Breaking: We've renamed and audited the use of all WordPress filter hooks to ensure they're actually helpful. We're using them internally to support plugin extensions, and have provided several docs on how to use them.
  • We've added support for WPGatsby Action Monitors.

Behind the scenes

  • 🚨 Breaking: The entire PHP codebase has been refactored to follow WPGraphQL ecosystem best practices. The namespaces, folder structure, and many file names have changed.
  • 🚨 Breaking: We've removed all previously deprecated code. This includes the DraftEntryUpdater mutations, numerous GraphQL fields, and several PHP classes and interfaces.
  • 🚨 Breaking: We're now properly using GraphQL data loaders, models, and connection loaders, bringing with them significant performance boosts. As a result Global Ids are now prefixed with the data loader name, instead of the GraphQL object type.
  • We've stopped unnecessarily double-sanitizing and validating input values that are sanitized/validated by Gravity Forms.

Misc

  • feat: add connection from Entries to their generated Post object.
  • feat: FormField connections can now be filtered by the form pageNumber.
  • feat!: change dateCreated and dateUpdated to be in the site's timezone, and added the dateCreatedGmt and dateUpdatedGmt for GMT time.
  • fix: correctly fallback to default upload directory wen using GFUtils::handle_file_upload().
  • fix: don't double sanitize/validate input values that are handled natively by GF.
  • fix: prevent existing draft entry properties from being overwritten unnecessarily on update mutations.
  • fix!: The default orderby (formerly sort) direction for Forms is now DESC to match expected behavior.
  • dev!: change arguments for GFUtils::get_resume_url() to allow for empty sourceUrls.
  • chore: move functionality for GF Signature, Quiz, and Chained Selects to the WPGraphQL/GF/Extensions namespace.
  • chore: Update Composer deps.
  • chore: Update PHPStan to v1.x and lint.
  • docs: Updated existing docs to reflect schema changes, and added Recipes that explain in detail how to extend the plugin.
  • tests: Refactored FormField tests to use GF field settings to derive the expected GraphQL response.
  • tests: Add tests for FileUpload, PostCategory, PostImage, PostTags, and Signature fields, as well as for updateGfEntry and updateGfDraftEntry mutations.

Important Schema Changes:

Renamed

  • Field allowsPrepopulate was renamed to canPrepopulate.
  • Field chainedSelectsHideInactive was renamed to shouldHideInactiveChoices.
  • Field copyValuesOptionField was renamed to copyValuesOptionFieldId.
  • Field disableAutoformat was renamed to isAutoformatted.
  • Field disableMargins was renamed to hasMargins.
  • Field displayAlt was renamed to hasAlt.
  • Field displayCaption was renamed to hasCaption.
  • Field displayDescription was renamed to hasDescription.
  • Field displayProgressbarOnConfirmation was renamed to hasProgressbarOnConfirmation.
  • Field displayTitle was renamed to hasTitle.
  • Field emailConfirmEnabled was renamed to hasEmailConfirmation.
  • Field enableAttachments was renamed to shouldSendAttachments.
  • Field enableAutocomplete was renamed to hasAutocomplete.
  • Field enableCalculation was renamed to isCalculation.
  • Field enableChoiceValue was renamed to hasChoiceValue.
  • Field enableColumns was renamed to hasColumns.
  • Field enableCopyValuesOption was renamed to shouldCopyValuesOption.
  • Field enableEnhancedUI was renamed to hasEnhancedUI.
  • Field enableOtherChoice was renamed to hasOtherChoice.
  • Field enablePasswordInput was renamed to isPasswordInput.
  • Field enablePrice was renamed to hasPrice.
  • Field enableSelectAll was renamed to hasSelectAll.
  • Field FormPagination.pages was renamed to pageNames.
  • Field gravityFormsEntries was renamed to gfEntries. It now returns the gfEntry interface.
  • Field gravityFormsEntry was removed in favor of the gfEntry Interface.
  • Field isPass was renamed to isPassingScore.
  • Field multipleFiles was renamed to canAcceptMultipleFiles.
  • Field noDuplicates was renamed to shouldAllowDuplicates.
  • Field passwordStrengthEnabled was renamed to hasPasswordStrengthIndicator.
  • Field postFeaturedImage was renamed to isFeaturedImage.
  • Field useRichTextEditor was renamed to hasRichTextEditor.
  • Fields gravityFormsForm was renamed to gfForm.
  • Fields gravityFormsForms was renamed to gfForms.
  • Mutation deleteGravityFormsDraftEntry and its associated Input and Payload objects were renamed to deleteGfDraftEntry.
  • Mutation deleteGravityFormsEntry and its associated Input and Payload objects were renamed to deleteGfEntry and their fields changed.
  • Mutation submitGravityFormsDraftEntry and its associated Input and Payload objects were renamed to submitGfDraftEntry.
  • Mutation submitGravityFormsForm and its associated Input and Payload objects were renamed to submitGfForm and their fields changed.
  • Mutation updateGravityFormsDraftEntry and its associated Input and Payload objects were renamed to updateGfDraftEntry.
  • Mutation updateGravityFormsEntry and its associated Input and Payload objects were renamed to updateGfEntry.
  • Object AddressInput was renamed to AddressFieldInput.
  • Object AddressTypeEnum was renamed to AddressFieldTypeEnum.
  • Object Button was renamed to FormButton.
  • Object ButtonType was renamed to Enum.
  • Object CalendarIconTypeEnum was renamed to FormFieldCalendarIconTypeEnum.
  • Object CalendarIconTypeEnum was renamed to FormFieldCalendarIconTypeEnum.
  • Object CaptchaThemeEnum was renamed to CaptchaFieldThemeEnum.
  • Object CaptchaTypeEnum was renamed to CaptchaFieldTypeEnum.
  • Object ChainedSelectInput was renamed to ChainedSelectFieldInput.
  • Object ChainedSelectsAlignmentEnum was renamed to ChainedSelectFieldAlignmentEnum.
  • Object CheckboxInput was renamed to CheckboxFieldInput.
  • Object ChoiceProperty was replaced with form-field specific {FieldType}FieldChoice objects.
  • Object ConfirmationTypeEnum was renamed to FormConfirmationTypeEnum.
  • Object ConfirmationTypeEnum was renamed to FormConfirmationTypeEnum.
  • Object DateTypeEnum was renamed to DateFieldTypeEnum.
  • Object DescriptionPlacementPropertyEnum was renamed to FormFieldDescriptionPlacementEnum.
  • Object EmailInput was renamed to EmailFieldInput.
  • Object FieldFiltersOperatorInputEnum was renamed to FieldFiltersOperatorEnum.
  • Object FieldValuesInput was renamed to FormFieldValuesInput.
  • Object FormFieldsEnum was renamed to FormFieldTypeEnum.
  • Object GravityFormsForm and its associated connection object Types were renamed to GfForm.
  • Object LabelPlacementPropertyEnum was renamed to FormFieldLabelPlacementEnum and FormLabelPlacementEnum, depending on the context.
  • Object LastPageButton was renamed to FormLastPageButton.
  • Object MinPasswordStrengthEnum was renamed to PasswordFieldMinStrengthEnum.
  • Object NameInput was renamed to NameFieldInput.
  • Object NotificationToTypeEnum was renamed to FormNotificationToTypeEnum.
  • Object PageProgressStyleEnum was renamed to FormPageProgressStyleEnum.
  • Object PageProgressTypeEnum was renamed to FormPageProgressTypeEnum.
  • Object PostImageValueProperty was renamed to ImageFieldValue.
  • Object QuizGrades was renamed to FormQuizGrades.
  • Object QuizGradingTypeEnum was renamed to QuizFieldGradingTypeEnum.
  • Object QuizSettings was renamed to FormQuiz.
  • Object RequiredIndicatorEnum was renamed to `FormFieldRequ...
Read more

v0.9.2 - Bugfixes & Tests

16 Nov 17:51
3150b66
Compare
Choose a tag to compare

This minor release addresses an issue where PostImageInput would be registered to the schema even if WPGraphQL Upload wasn't enabled, breaking gqty and Gatsby schema generation. We also fixed a few other bugs and some overlooked items in the docs, and added some more WPUnit tests.

  • fix: add missing allowsPrepopulate property to PostContentField.
  • fix: Utils::maybe_decode_json() support for multidimensional arrays.
  • fix: Check for WPGraphQL Upload before registering PostImageInput to the schema.
  • chore: define WPGraphQL types with Int instead of Integer for code consistency.
  • docs: Add TimeField to list of formFields that take a value input.
  • docs: add expected object values for FileUploadValues.
  • tests: add WPUnit tests for ListField, MultiSelectField, NameField, TimeField,PostContentField, PostTitleField, PostExcerptField, GFUtils::get_forms(), Utils::maybe_decode_json(), and WPGraphQLGravityForms::instances()
  • tests: remove tests for {fieldType}FieldValue edges, since they're deprecated anyway.

Note As part of the road to v1.0, the next release will contain numerous breaking changes to the codebase AND schema, including the removal of deprecated code (such as FieldValue edges). Please prepare accordingly.

v0.9.1 - Gravity Forms Quiz Support

01 Nov 12:38
10331e6
Compare
Choose a tag to compare

This minor release adds support for Gravity Forms Quiz fields.

  • feat: Add support for GF Quiz fields.
  • fix: Fixed the type descriptions for NoDuplicatesProperty and RadioChoiceProperty.
  • dev: Use GF_Field::get_input_type() when choosing how to handle input values. This will allow for better support of composite type fields in the future.
  • docs: Update language regarding UpdateDraftEntryFieldValue's upcoming deprecation.
  • docs: Fix link to Deleting Entries doc.
  • tests: Add WPUnit tests for EmailField.

v0.9.0 - Conditional Logic Support on Confirmations

06 Oct 22:06
e28558d
Compare
Choose a tag to compare

This minor release adds the conditionalLogic GraphQL field to gravityFormsForm.confirmations. We also squashed a few bugs and implemented some more WPUnit tests.

Note: This release technically contains breaking changes for developers making use of DataManipulator class methods in their own code.

  • feat: add conditionalLogic GraphQL field to gravityFormsForm.confirmations.
  • fix: consistently apply Gravity Forms filters and WPGraphQL error checking to GFUtils::get_forms().
  • dev!: makes DataManipulator methods static. If you are using any DataManipulator methods in your custom code, please update accordingly.
  • tests: Refactor formField tests to extend FormFieldTestCase.
  • tests: add WPUnit tests for HtmlField, PageField, PhoneField, SectionField, SelectField, RadioField, and WebsiteField.
  • chore: update Composer deps.

v0.8.2 - Bugfix

14 Sep 12:50
b02dbb4
Compare
Choose a tag to compare

This minor release fixes hasNextPage and hasPreviousPage checks on Entry connections.

  • fix: use entryIds in cursor for hasNextPage and havePreviousPage checks in the Entries resolver.
  • tests: add tests for has{Next|Previous}Page on Form and Entry Connections.
  • tests: add tests for HiddenField, and NumberField.
  • dev: update Composer dependencies.

v0.8.1 - `gform_pre_render` Support

18 Aug 00:44
afe1ae6
Compare
Choose a tag to compare

This minor applies the gform_pre_render filter to GFUtils::get_form().

  • feat: filter GFUtils::get_form() by gform_pre_render (h/t @travislopes ).
  • dev: add wp-graphql-stubs to composer devDependencies.

v0.8.0 - Revamped GraphQL Connections

12 Aug 13:55
d02c82e
Compare
Choose a tag to compare

⚠️ This release requires Gravity Forms v2.5.0 or higher.

This release reworks all GraphQL connections, implementing data loaders, optimizing database queries, and adding support for more where args in more situations.

New Features

  • gravityFormsForms can now be filtered by a list of form IDs.
  • FormEntry connections now have access to the following where args: status, dateFilters, fieldFilters, fieldFiltersMode.
  • formField can now be filtered by a list of field IDs, adminLabels, and the field type.
  • [Breaking] Full pagination support has been added to Forms and Entries. Note: cursor generation has changed, so if you are manually generating form or entry cursors, you will need to update your code.
  • [Breaking] FieldFiltersOperatorInputEnum now supports all remaining Gravity Forms entry search operators, such as LIKE, IS, IS_NOT. The GREATER_THAN and LESS_THAN operators have been removed, as they are not supported by Gravity Forms.

Bugfixes

  • Correctly handle sourceUrl changes in submitGravityFormsForm and updateGravityFormsDraftEntry mutations.
  • wp_graphql_gf_can_view_entries filter now correctly passes $form_ids instead of non-existent $entry_ids.
  • fieldFilters now correctly search through array entry values.
  • EntriesFieldFiltersInput.key is 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, FieldConnections and FormConnections.
  • [Breaking] RootQueryEntriesConnectionResolver and RootQueryFormsConnectionResolver classes were renamed to EntriesConnectionsResolver and FormConnectionResolver. They now properly extend AbstractConnectionResolver.
  • 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 where args.
  • tests: WPUnit tests now extend GFGraphQLTestCase.
  • tests: [Breaking] WPGraphQLGravityForms\Tests namespace has been renamed to Tests\WPGraphQL\GravityForms.

v0.7.3 - WPGraphQL v1.6.x Compatibility

03 Aug 15:31
a66c82a
Compare
Choose a tag to compare

This release adds compatibility with WPGraphQL v1.6.x, and its new lazy/eager type loading.

  • fix: Add eagerlyLoadType property to WPGraphQL type registration.
  • fix: Hook type registration using get_graphql_register_action().
  • fix: Fix typo in addressField.copyValueOptionsLabel type definition.
  • fix: Check entry values before (unnecessarily) updating them in SubmitGravityFormsForm mutation.
  • dev: Update composer dependencies.
  • tests: Clear WPGraphQL schema before/after each test.