Releases: AxeWP/wp-graphql-gravity-forms
v0.10.0.1 - Hotfix
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 interfaceFormField
was changed fromFormFieldTypeEnum!
toFormFieldTypeEnum
, sincegatsby-source-wordpress
doesn't support non-nullable Enums (h/t @sarah-wfaa).
v0.9.2.1 - Hotfix
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
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 theFormField
interface and on individual Form field objects have changed. - 🚨 Breaking: Complex Gravity Forms form fields now inherit the properties of their parent
$inputType
s. 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 thegf
shorthand for improved dx.gravityFormsForms
are nowgfForms
,updateGravityFormsEntry
is nowupdateGfEntry
, etc. - 🚨 Breaking: Gravity Forms entries and draft entries now inherit the
gfEntry
interface, and use theGfSubmittedEntry
andGfDraftEntry
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
anddateUpdated
to be in the site's timezone, and added thedateCreatedGmt
anddateUpdatedGmt
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
(formerlysort
) direction for Forms is nowDESC
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
, andSignature
fields, as well as forupdateGfEntry
andupdateGfDraftEntry
mutations.
Important Schema Changes:
Renamed
- Field
allowsPrepopulate
was renamed tocanPrepopulate
. - Field
chainedSelectsHideInactive
was renamed toshouldHideInactiveChoices
. - Field
copyValuesOptionField
was renamed tocopyValuesOptionFieldId
. - Field
disableAutoformat
was renamed toisAutoformatted
. - Field
disableMargins
was renamed tohasMargins
. - Field
displayAlt
was renamed tohasAlt
. - Field
displayCaption
was renamed tohasCaption
. - Field
displayDescription
was renamed tohasDescription
. - Field
displayProgressbarOnConfirmation
was renamed tohasProgressbarOnConfirmation
. - Field
displayTitle
was renamed tohasTitle
. - Field
emailConfirmEnabled
was renamed tohasEmailConfirmation
. - Field
enableAttachments
was renamed toshouldSendAttachments
. - Field
enableAutocomplete
was renamed tohasAutocomplete
. - Field
enableCalculation
was renamed toisCalculation
. - Field
enableChoiceValue
was renamed tohasChoiceValue
. - Field
enableColumns
was renamed tohasColumns
. - Field
enableCopyValuesOption
was renamed toshouldCopyValuesOption
. - Field
enableEnhancedUI
was renamed tohasEnhancedUI
. - Field
enableOtherChoice
was renamed tohasOtherChoice
. - Field
enablePasswordInput
was renamed toisPasswordInput
. - Field
enablePrice
was renamed tohasPrice
. - Field
enableSelectAll
was renamed tohasSelectAll
. - Field
FormPagination.pages
was renamed topageNames
. - Field
gravityFormsEntries
was renamed togfEntries
. It now returns thegfEntry
interface. - Field
gravityFormsEntry
was removed in favor of thegfEntry
Interface. - Field
isPass
was renamed toisPassingScore
. - Field
multipleFiles
was renamed tocanAcceptMultipleFiles
. - Field
noDuplicates
was renamed toshouldAllowDuplicates
. - Field
passwordStrengthEnabled
was renamed tohasPasswordStrengthIndicator
. - Field
postFeaturedImage
was renamed toisFeaturedImage
. - Field
useRichTextEditor
was renamed tohasRichTextEditor
. - Fields
gravityFormsForm
was renamed togfForm
. - Fields
gravityFormsForms
was renamed togfForms
. - Mutation
deleteGravityFormsDraftEntry
and its associatedInput
andPayload
objects were renamed todeleteGfDraftEntry
. - Mutation
deleteGravityFormsEntry
and its associatedInput
andPayload
objects were renamed todeleteGfEntry
and their fields changed. - Mutation
submitGravityFormsDraftEntry
and its associatedInput
andPayload
objects were renamed tosubmitGfDraftEntry
. - Mutation
submitGravityFormsForm
and its associatedInput
andPayload
objects were renamed tosubmitGfForm
and their fields changed. - Mutation
updateGravityFormsDraftEntry
and its associatedInput
andPayload
objects were renamed toupdateGfDraftEntry
. - Mutation
updateGravityFormsEntry
and its associatedInput
andPayload
objects were renamed toupdateGfEntry
. - Object
AddressInput
was renamed toAddressFieldInput
. - Object
AddressTypeEnum
was renamed toAddressFieldTypeEnum
. - Object
Button
was renamed toFormButton
. - Object
ButtonType
was renamed toEnum
. - Object
CalendarIconTypeEnum
was renamed toFormFieldCalendarIconTypeEnum
. - Object
CalendarIconTypeEnum
was renamed toFormFieldCalendarIconTypeEnum
. - Object
CaptchaThemeEnum
was renamed toCaptchaFieldThemeEnum
. - Object
CaptchaTypeEnum
was renamed toCaptchaFieldTypeEnum
. - Object
ChainedSelectInput
was renamed toChainedSelectFieldInput
. - Object
ChainedSelectsAlignmentEnum
was renamed toChainedSelectFieldAlignmentEnum
. - Object
CheckboxInput
was renamed toCheckboxFieldInput
. - Object
ChoiceProperty
was replaced with form-field specific{FieldType}FieldChoice
objects. - Object
ConfirmationTypeEnum
was renamed toFormConfirmationTypeEnum
. - Object
ConfirmationTypeEnum
was renamed toFormConfirmationTypeEnum
. - Object
DateTypeEnum
was renamed toDateFieldTypeEnum
. - Object
DescriptionPlacementPropertyEnum
was renamed toFormFieldDescriptionPlacementEnum
. - Object
EmailInput
was renamed toEmailFieldInput
. - Object
FieldFiltersOperatorInputEnum
was renamed toFieldFiltersOperatorEnum
. - Object
FieldValuesInput
was renamed toFormFieldValuesInput
. - Object
FormFieldsEnum
was renamed toFormFieldTypeEnum
. - Object
GravityFormsForm
and its associated connection object Types were renamed toGfForm
. - Object
LabelPlacementPropertyEnum
was renamed toFormFieldLabelPlacementEnum
andFormLabelPlacementEnum
, depending on the context. - Object
LastPageButton
was renamed toFormLastPageButton
. - Object
MinPasswordStrengthEnum
was renamed toPasswordFieldMinStrengthEnum
. - Object
NameInput
was renamed toNameFieldInput
. - Object
NotificationToTypeEnum
was renamed toFormNotificationToTypeEnum
. - Object
PageProgressStyleEnum
was renamed toFormPageProgressStyleEnum
. - Object
PageProgressTypeEnum
was renamed toFormPageProgressTypeEnum
. - Object
PostImageValueProperty
was renamed toImageFieldValue
. - Object
QuizGrades
was renamed toFormQuizGrades
. - Object
QuizGradingTypeEnum
was renamed toQuizFieldGradingTypeEnum
. - Object
QuizSettings
was renamed toFormQuiz
. - Object
RequiredIndicatorEnum
was renamed to `FormFieldRequ...
v0.9.2 - Bugfixes & Tests
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 toPostContentField
. - 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 ofInteger
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()
, andWPGraphQLGravityForms::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
This minor release adds support for Gravity Forms Quiz fields.
- feat: Add support for GF Quiz fields.
- fix: Fixed the type descriptions for
NoDuplicatesProperty
andRadioChoiceProperty
. - 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
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 togravityFormsForm.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
, andWebsiteField
. - chore: update Composer deps.
v0.8.2 - Bugfix
This minor release fixes hasNextPage
and hasPreviousPage
checks on Entry connections.
- fix: use
entryIds
in cursor forhasNextPage
andhavePreviousPage
checks in the Entries resolver. - tests: add tests for
has{Next|Previous}Page
on Form and Entry Connections. - tests: add tests for
HiddenField
, andNumberField
. - dev: update Composer dependencies.
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-stubs
to 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
gravityFormsForms
can now be filtered by a list of form IDs.FormEntry
connections now have access to the followingwhere
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
andEntries
. 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 asLIKE
,IS
,IS_NOT
. TheGREATER_THAN
andLESS_THAN
operators have been removed, as they are not supported by Gravity Forms.
Bugfixes
- Correctly handle
sourceUrl
changes insubmitGravityFormsForm
andupdateGravityFormsDraftEntry
mutations. wp_graphql_gf_can_view_entries
filter now correctly passes$form_ids
instead of non-existent$entry_ids
.fieldFilters
now correctly search througharray
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
andFormConnections
. - [Breaking]
RootQueryEntriesConnectionResolver
andRootQueryFormsConnectionResolver
classes were renamed toEntriesConnectionsResolver
andFormConnectionResolver
. 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
where
args. - tests: WPUnit tests now extend
GFGraphQLTestCase
. - tests: [Breaking]
WPGraphQLGravityForms\Tests
namespace 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
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.