This major release adds support for server-side captcha validation, plugin updates from the WordPress backend, and new features from Gravity Forms v2.6. We've also refactored the internal file upload mechanism to better integrate with GF's form submission lifecycle, leading to more reliable (and in some cases, more performant) results.
Lastly, we fixed the GraphQL type names on some of the Product and Shipping fields, so we can hopefully add mutation support in future minor releases (and not break back-compat).
Note: The minimum version of WPGraphQL has been bumped to v1.7.0.
- 🚨 Breaking: We've added support for server-side captcha validation with reCAPTCHA. Note: If you are already using captcha fields in your form, you will need to modify your code to to pass the validation token to
fieldValues
. - 🚨 Breaking: The
button
field onGfForm
has been deprecated in favor ofform.submitButon
. Both now use the newFormSubmitButton
GraphQL type (instead of the oldFormButton
), which adds support forlayoutGridColumnSpan
,location
andwidth
properties added in GF v2.6. - We've added support for plugin updates on the WordPress backend. A warning is displayed along with the update notice when upgrading to a version with possible breaking changes (e.g. v0.X.y ).
- We've added a new
FileUploadValues
GraphQL type to theFileUploadField
which includes thebasePath
,baseUrl
, andfilename
fields in addition to the existingurl
. These fields have also been added toImageFieldValues
.
- Added the
graphql_gf_update_repo_url
filter to control the source of the Update Checker. - Reworked the logic handling file uploads to use the native GF form submission lifecycle whenever possible.
- chore!: The minimum version of WPGraphQL is now v1.7.0.
- fix!: The
ProductHiddenProductField
,ProductSingleProductField
, andShippingSingleShippingField
have been renamed toProductHiddenField
,ProductSingleField
, andShippingSingleField
, respectively, in line with other child fields. - fix: Don't hide the
CALCULATION
,HIDDENPRODUCT
,SINGLEPRODUCT
andSINGLESHIPPING
values from theFormFieldTypeEnum
. - fix: Resolve
FormQuiz
data using the unmodeledform
data instead of theFormObject
model. - dev: The
lastPageButton
field onGFForm
has been deprecated in favor ofform.pagination.lastPageButton
, where the other pagination fields live. - dev: The
values
field onFileUploadField
has been deprecated in favor offileUploadValues
. - dev: The
GFUtils::handle_file_upload()
method has been deprecated. - dev: The
graphql_gf_form_modeled_data_experimental
filter has been deprecated in favor of WPGraphQL's nativegraphql_model_prepare_fields
.
This minor release fixes a few bugs in the FormsConnectionResolver
. We've also added GitHub Actions for PHPStan and GraphQL schema linting.
- fix: Prevent
gfForms
queries with thelast
argument from truncating the final node. - fix: Correctly return
hasNextPage
andhasPreviousPage
values ongfForms
connections. - dev: Refactor
bin/install-test-env
into resuable functions. - chore: Update Composer dependencies.
- chore: Add GH action to save GraphQL artifact to release.
- tests: Add GH Action for GraphQL schema linting.
- tests: Add GH Action for PHPStan
This minor release adds the a form's total entries count
and its quizResults
to the GfFormToGfEntryConnection
connection.
E.g.:
query {
gfForm(id: $id, idType: $idType) {
entries {
count # the number of entries submitted
quizResults { # The quiz results summary
averagePercentage
passRate
gradeCounts { # the frequency of each grade
count
grade
}
fieldCounts { ## the individual field breakdown
correctCount
formField {
node {
label
}
}
choiceCounts { ## the frequency of each answer
count
text
}
}
}
}
}
}
- feat: Add
count
toGfFormToGfEntryConnection
. - feat: Add
quizResults
toGfFormToGfEntryConnection
. - dev: Make original form data available via the Form model.
- chore: Update Composer deps.
- chore: Fix a few GraphQL descriptions that were missing a closing
.
.
This minor release adds support for WP Jamstack Deployments. We also fixed a bug where non-authenticated users could not access their own entry
on the submitGfForm
payload.
- feat: Add support for WP Jamstack Deployments.
- fix: Use
graphql_gf_can_view_entries
filter to exposesubmitGfFormMutation.entry
to non-authenticated users. (h/t @robmarshall and @IlirBajrami ) - fix: Change WPGatsby Trigger from deprecated
gform_after_duplicate_form
action togform_post_form_duplicated
. - dev: add
$resume_token
and$draft_entry arguments
tographql_gf_can_view_draft_entries
. - dev: add
$entry_id
and$entry arguments
tographql_gf_can_view_entries
. - tests: use
databaseId
instead of deprecatedformId
when testingFormQueriesTest
- chore: Add new plugin logo and banner ✨
This minor release adds official support for PHP v8.0. We also added Gravity Forms Settings to the schema.
- feat: Add support for PHP v8.0.
- feat: Add
gfSettings
to GraphQL schema. - dev: Restore
env.dist
to the repo, and add.devcontainer
to.gitignore
. - chore: Update composer deps.
This minor release adds query support for Gravity Forms Personal Data settings and the isActive
field to FormConfirmation
objects, and fixes a couple of bugs.
- feat: Add
personalData
settings toGfForm
and relevantFormField
objects. - feat: Add field
isActive
to theFormConfirmation
object (h/t @natac13). - fix: Prevent PHP notice caused by the
PostFormatTypeEnum
enum on sites withoutpost-formats
support (h/t @noshoesplease ). - fix: Ensure
timeValues.minutes
returns the 2-digit (mm
) string. - tests: Fix tests incorrectly passing when a node index isn't explicitly set.
- dev: Update composer dependencies.
- docs: Fix missing/broken links and wording regarding custom mutation support.
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).
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.
- 🚨 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.
- 🚨 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.
- 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.
- 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 toFormFieldRequiredIndicatorEnum
. - Object
RuleOperatorEnum
was renamed toFormRuleOperatorEnum
. - Object
SaveAndContinue
was renamed toFormSaveAndContinue
. - Object
SignatureBorderStyleEnum
was renamed toSignatureFieldBorderStyleEnum
. - Object
SignatureBorderWidthEnum
was renamed toSignatureFieldBorderWidthEnum
. - Object
SizePropertyEnum
was renamed toFormFieldSizeEnum
. - Object
VisibilityPropertyEnum
was renamed toFormFieldVisibilityEnum
.
- Field
adminLabel
was removed from object types:CaptchaField
,HiddenField
,HtmlField
,PageField
,sectionField
. - Field
adminOnly
was removed from all FormFields in favor ofvisibility
. - Field
autocompleteAttribute
was removed from object typeEmailField
- Field
conditionalLogic
was removed from object typeHiddenField
- Field
copyValuesOptionDefault
was removed from object type AddressField, in favor ofshoudCopyValuesOption
- Field
cssClass
was removed from object typeHiddenField
- Field
cssClassList
(deprecated) was removed from allFormField
objects. - Field
defaultValue
was removed from object typeEmailField
- Field
formId
was removed from individualFormField
objects. - Field
inputName
was removed from object types:ConsentField
,EmailField
,TimeField
,FileUploadField
,HtmlField
,PostImageField
. - Field
isHidden
(deprecated) was removed from object typeChainedSelectInputProperty
,DateInputProperty
,EmailInputProperty
, - Field
isRequired
was removed from object typeHiddenField
- Field
key
(deprecated) was removed from object typeDateInputProperty
,EmailInputProperty
- Field
label
(deprecated) was removed from object typePageField
- Field
name
(deprecated) was removed from object typeDateInputProperty
- Field
nameFormat
was removed from object typeNameField
- Field
placeholder
was removed from object typePasswordField
- Field
quizType
was removed from interfaceQuizField
, in favor ofinputType
. - Field
size
was removed from object types:AddressField
,CaptchaField
,ChainedSelectField
,CheckboxField
,DateField
,FileUploadField
,HiddenField
,HtmlField
,ListField
,NameField
,PageField
,RadioField
,SectionField
,SignatureField
,TimeField
, PostImageField - Field
value
(deprecated) was removed from object typeListFieldValue
- Object
EntriesSortingInput
was removed, in favor ofEntriesConnectionOrderbyInput
. - Object
FormsSortingInput
was removed, in favor ofFormsConnectionOrderbyInput
. - The following items associated with the deprecated method of form submissions have been removed, including
RootQuery.createGravityFormsDraftEntry
,RootQuery.updateDraftEntry{FieldType}FieldValue
, and their relatedInput
andPayload
objects. Most{FieldType}FieldValue
types were removed, butAddressFieldValue
,CheckboxFieldValue
,ListFieldValue
,NameFieldValue
,TimeFieldValue
have been repurposed. - Type
CheckboxInputValue
was removed, in favor ofCheckboxFieldInput
- Type
EntryForm
was removed, in favor of returning theGfForm
directly. - Type
EntryUser
was removed, in favor of returning theUser
directly. - Type
GravityFormsEntry
was removed, in favor of theGfEntry
interface andGfSubmittedEntry
object type. The associated Connection object types have been renamed as well. - Type
ListInputValue
was removed, in favor ofListFieldValue
- Type
SortingInputEnum
was removed, in favor of theOrderEnum
.
- Field
AddressField.country
changed type fromString
toAddressFieldCountryEnum
- Field
AddressField.defaultCountry
changed type fromString
toAddressFieldCountryEnum
- Field
allowedExtensions
changed type fromString
to[String]
- Field
subLabelPlacement
changed type fromString
toFormFieldSubLabelPlacement
on allFormField
objects. - Field
TimeFieldValue.amPm
changed type fromString
toAmPmEnum
- Field
type
changed type fromString!
toFormFieldTypeEnum!
on allFormField
objects. - Input field
idType
changed type fromIdTypeEnum
to the Enum relevant to the object type (e.g.FormIdTypeEnum
). - Objects
PostCategoryField
,PostCustomField
,PostTagsField
,QuizField
were changed to a GraphQLInterface
, and their possible Form field types added as objects. - The generic
ChoiceProperty
object was replaced with form-field-specific objects{FieldType}ChoiceProperty
- The generic
InputProperty
object was replaced with form-field-specific objects{FieldType}InputProperty
- Field
captchaBadgePosition
was added to object typeCaptchaField
- Field
consentValue
was added to object typeConsentField
- Field
displayOnly
was added to interfaceFormField
. - Field
hasInputMask
was added to object typeTextField
. - Field
hasPasswordVisibilityToggle
was added to object type PasswordField - Field
inputMaskValue
was added to object type TextField - Field
isOtherChoice
was added to object type QuizChoiceProperty - Field
isSelected
was added to object type QuizChoiceProperty - Field
labelPlacement
was added to the relevantFormField
object types. - Field
text
was added to object typeCheckboxFieldValue
- Field
value
was added to every relevantFormField
object type, in addition to their special{FieldType}Value
. - Field
visibility
was moved to interfaceFormField
- The following fields are no longer deprecated:
AddressField.inputName
,CaptchaField.visibility
,DateInputProperty.autocompleteAttribute
,HiddenField.visibility
,HtmlField.visibility
,NameField.inputName
,PageField.visibility
,PasswordField.visibility
. - Type
ListFieldInput
was added - Type
NodeWithForm
was added - Type
PostFormatTypeEnum
. - Types
FormEntryLimits
,FormLogin
,FormPostCreation
,FormSchedule
were added toGfForm
. Relevant fields fromgfForm
have been moved.
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.
- 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
. - 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. - 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.
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
.
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.
- fix: consistently apply Gravity Forms filters and WPGraphQL error checking to
GFUtils::get_forms()
. - feat: add
conditionalLogic
GraphQL field togravityFormsForm.confirmations
. - 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.
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.
This minor release 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
.
**
This release reworks all GraphQL connections, implementing data loaders, optimizing database queries, and adding support for more where args in more situations.
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.
- 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.
- [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
.
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.
-
(Re-released, as the last one incorectly contained the old version.)
-
Fixes bug where unset
formFields
properties would cause a type error forEnums
. (h/t @natac13)
- Fixes error when filtering
gravityFormsEntries
by a value in any field (i.e. whenfieldFilters.key
is"0"
).
**
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.
- Added support for
FileUpload
andPostImage
field 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
.
chainedSelectValues
input is now only visible if the Chained Selects plugin is active.- The
Entry
GraphQL type now implements thewp_graphql_gf_can_view_entries
filter.
- feat: add
altText
toPostImage
field values. - feat: The
pageNumber
field 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}_values
filter, in favor ofwp_graphql_gf_{$enumType}_values
. - dev: deprecated
wp_graphql_gf_field_types
filter, as it no longer necessary to manually map GraphQL fields to GFformFields
. - dev: deprecated
wp_graphql_gf_form_field_instances
andwp_graphql_gf_field_value_instances
filters in favor ofwp_graphql_gf_instances
. - dev: Deprecated the
adminOnly
,allowsPrepopulated
andinputName
fields onPostImageField
. - dev: Updated composer dependencies.
- dev!:
scr/connections
now extendAbstractConnection
- dev!:
src\Types\Input
now extendAbstractInput
. Their functions have changed accordingly. - dev!: Class
AbstractField
has been deprecated in favor ofAbstractFormField
. Its functions have changed accordingly. - dev!: Classes
AbstractProperty
,AbstractFieldValue
have been deprecated in favor ofAbstractObject
. Their functions have changed accordingly. - dev!: make plugin
$instances
static for easier access and extension. - dev!: The
Enum
,InputType
,ValueProperty
PHP interface has been deprecated. Please update your code. - dev!: The methods required by the
FieldValue
,Type
PHP interface have changed. Please update your code. - tests: Removed
testGetEnabledFieldTypes
now that we are usingstatic $instances
.
- Adds support for missing date formats (dmy_dash, dmy_dot, ymd_slash, ymd_dash, ymd_dot).
- Fix: EmailInputProperty description updated.
- Dev: autocompleteAttribute has been deprecated on EmailInputProperty.
- Tests: Added
updateEntry
andupdateDraftEntry
mutations to existingformField
tests. - Tests: Add tests for CheckboxField, ConsentField, and DateField.
- Fixes
submitGravityFormsForm
not saving signature field value after v0.6.2.1.
- Fixes
updateGravityFormsEntry
not saving signature field value.
- Fixes
updateGravityFormsEntry
mutation not propery saving complex field values (h/t @natac13 ) - Fixes mutations not correctly deleting old
SignatureField
files from the server (h/t @natac13 ) - Fixes
SignatureFieldValue
s failing Gravity FormsisRequired
validation (h/t/ @natac13). - Fixes empty
formFields.layoutGridColumnSpan
values not returning asnull
. - Removes deprecation from
ChainedSelectInput.name
. - Correctly sets
graphql_connection_max_query_amount
to a minimum of600
. AbstractMutation::prepare_field_value_by_type()
no longer tries processing unrecognized fields.- Dev: Added filter
wp_graphql_gf_prepare_field_value
for processing custom field values. - Dev: Added filter
wp_graphql_gf_field_value_type
for 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
ChainedSelect
fields and values.
- Fixes a fatal error when adding support for new fields with the
wp_graphql_gf_field_types
filter.
This release adds support for all the new goodies in Gravity Forms v2.5, squashes a few bugs related to Captcha fields, and refactors the InputProperty
on various form fields.
- Added
customRequiredIndicator
,markupVersion
,requiredIndicator
,validationSummary
andversion
toGravityFormsForm
object. - Added
layoutGridColumnSpan
andlayoutSpacerGridColumnSpan
toformFields
interface. - Added
enableAutocomplete
andautocompleteAttribute
toAddressField
,EmailField
,NameField
,NumberField
,PhoneField
,SelectField
, andTextField
. - Added
displayOnly
property toCaptchaField
. - Added
allowedExtensions
anddisplayAlt
property toPostImageField
. - Added
sort
argument for filteringRootQueryToGravityFormsFormConnection
. Note: Attempting to sort on GF < v2.5.0.0 will throw aUserError
.
- [Breaking]: Fixed the
captchaTheme
enum to use the correct possible values:light
anddark
. captchaTheme
andcaptchaType
now correctly returnnull
when not set by the field.- The
captchaType
enum now has a default value ofRECAPTCHA
.
- Refactor various
InputProperty
classes.InputDefaultValueProperty
,InputLabelProperty
, andInputplaceholderProperty
have been removed for theirFieldProperty
cousins, andEmailInputProperty
is now being used forEmailField
. - Tests: Clear
GFFormDisplay::$submission
between individual tests. - Tests: Allow overriding the default field factories.
- Tests: Adds tests for
CaptchaField
.
**
This release moves entry.formField
values from edges
to nodes
, slimming down the query boilerplate and making the plugin compatible with gatsby-source-wordpress
. We also added support for submitting an email confirmationValue
and retrieving PostImage
values, squashed a few bugs, and made the wp_graphql_gf_can_view_entries
filter more useful.
We also complete removed the form/entry fields
property. All usage should be replaced with formFields
.
- [Breaking] Removed
fields
fromentry
andform
. Please update your code to useformFields
instead. - [Breaking] Added support for submitting email confirmation values by using a new input type
FieldValuesInput.emailValues
.
{
submitGravityFormsForm(
input: {
formId: 1
clientMutationId: "123abcc"
fieldValues: [
{
id: 1
- value: "[email protected]"
+ emailValues: {
+ value: "[email protected]"
+ confirmationValue: "[email protected]" # Only necessary if Email confirmation is enabled.
}
}
]
}
)
}
- [Breaking] The
wp_graphql_gf_can_view_entries
filter now passesentry_ids
instead offield_ids
. This lets you do cool things like allowing authenticated users to edit only their own entries:
add_filter(
'wp_graphql_gf_can_view_entries',
function( bool $can_view_entries, array $entry_ids ) {
if ( ! $can_view_entries ) {
$current_user_id = get_current_user_id();
// Grab each queried entry and check if the `created_by` id matches the current user id.
foreach ( $entry_ids as $id ) {
$entry = GFAPI::get_entry( $id );
if ( $current_user_id !== (int) $entry['created_by'] ) {
return false;
}
}
}
return true;
},
10,
2
);
- Deprecated
formFields.edges.fieldValue
in favor offormFields.nodes.{value|typeValues}
. Not just does this dramatically slim down the boilerplate needed for your queries, but it also works withgatsby-source-wordpress
.
{
gravityFormsEntry(id: 2977, idType: DATABASE_ID) {
formFields{
- edges {
- fieldValue {
- ... on TextFieldValue {
- value
- }
- ... on CheckboxFieldValue {
- checkboxValues {
- inputId
- value
- }
- }
- ... on AddressFieldValue {
- addressValues {
- street
- lineTwo
- city
- state
- zip
- country
- }
- }
- }
- }
nodes {
... on TextField {
# Other field properties
+ value
}
... on CheckboxField {
# Other field properties
+ checkboxValues {
+ inputId
+ value
+ }
}
... on AddressField {
# Other field properties
+ addressValues {
+ street
+ lineTwo
+ city
+ state
+ zip
+ country
+ }
}
}
}
}
}
- Added support for retrieving
PostImage
field values.
- Fixed field
id
s missing fromUpdateDraftEntry{Type}FieldValue
errors
. - Prevented PHP notices about missing
entry_id
when `submitGravityFormsDraftEntry fails. - Prevented
UpdateDraftEntry{Type}FieldValue
from deleting the previously storedip
. - Entry queries now correctly check for
gform_full_access
permission whengravityforms_edit_entries
doesn't exist. - Undeprecate
InputKeyProperty
onname
andaddress
fields. Although this is not part of the GF api, it is helpful to associate theinputs
with their entryvalues
.
- Added more unit tests for
TextField
,TextAreaField
, andAddressField
. - Refactored
FieldProperty
classes to useAbstractProperty
.
- Uses
sanitize_text_field
to sanitize email values, so failing values can be validated by Gravity Forms. ( h/t @PudparK )
**
This release adds the submitGravityFormsForm
mutation that submit forms without needing to use the existing createGravityFormsDraftEntry
-> updateDraftEntry{fieldType}Value
-> submitGravityFormsDraftEntry
flow.
Similarly, we've added support for updating entries and draft entries with a single mutation each, and added support for using form and entry IDs in queries - without needing to convert them to a global ID first. We also deprecated fields
in favor of formFields
, so there's less confusion between GF fields and GraphQL fields.
Also, we made several (breaking) changes to streamline queries and mutations: many GraphQL properties have been changed to Enum
types, and formFields
(and the now-deprecated fields
) are now an interface. This should make your queries and mutations less error-prone and (a bit) more concise. We're also now using native Gravity Forms functions wherever possible, which should help ensure consistency going forward.
Beyond that, we've squashed some bugs, deprecated some confusing and unnecessary fields, and refactored a huge portion of the codebase that should speed up development and improve code quality in the long term.
- Added
submitGravityFormsForm
mutation to bypass the existing draft entry flow. See README. MD for usage. - Added
updateGravityFormsEntry
andupdateGravityFormsDraftEntry
mutations that follow the same pattern. - Added
idType
toGravityFormsForm
andGravityFormsEntry
, so you can now query them using the database ID, instead of generating a global id first. - Added
id
property toFieldErrors
, so you know which failed validation. - Deprecated the
fields
property onGravityFormsForm
andGravityFormsEntry
in favor offormFields
. - Support cloning an existing entry when using
createGravityFormsDraftEntry
using thefromEntryId
input property. - Converted all Gravity Forms
formFields
(and the now-deprecatedfields
) to a GraphQL Interface type. That means your queries can now look like this:
query {
gravityFormsForms {
nodes {
formFields {
nodes {
formId
type
id
... on AddressField {
inputs {
defaultValue
}
}
... on TextField {
defaultValue
}
}
}
}
}
}
- Switched many field types from
String
toEnum
: AddressField.addressType
Button.type
CaptchaField.captchaTheme
CaptchaField.captchaType
CaptchaField.simpleCaptchaSize
ChainedSelectField.chainedSelectsAlignment
ConditionalLogic.actionType
ConditionalLogic.logicType
ConditionalLogicRule.operator
DateField.calendarIconType
DateField.dateFormat
DateField.dateType
EntriesFieldFilterInput.operator
EntriesSortingInput.direction
Form.descriptionPlacement
Form.labelPlacement
Form.limitEntriesPeriod
Form.subLabelPlacement
FormConfirmation.type
FormNotification.toType
FormNotificationRouting.operator
FormPagination.style
FormPagination.type
GravityFormsEntry.fieldFiltersNode
GravityFormsEntry.status
NumberField.numberFormat
PasswordField.minPasswordStrength
PhoneField.phoneFormat
RootQueryToGravityFormsFormConnection.status
SignatureField.borderStyle
SignatureField.borderWidth
TimeField.timeFormat
visibilityProperty
- FieldProperty:
descriptionPlacement
- FieldProperty:
labelPlacement
- FieldProperty:
sizeProperty
SaveAndContinue
now usesbuttonText
instead of theButton
type.lastPageButton
now uses its own GraphQL type with the relevant fields.- The
resumeToken
input field on thedeleteGravityFormsDraftEntry
,SubmitGravityFormsDraftEntry
, and all theupdateDraftEntry{fieldType}Value
mutations is now a non-nullableString!
. - When querying entries, we check that
createdByID
is set before trying to fetch the uerdata. - Where possible, mutations and queries now try to return an
errors
object instead of throwing an Exception. - We've added more descriptive
Exception
messages across the plugin, to help you figure out what went wrong. - We fixed a type conflict with
ConsentFieldValue
.value
now returns aString
with the consent message, ornull
if false. - Deprecated
url
in favor ofvalue
onFileUploadFieldValue
andSignatureFieldValue
. - Deprecated
cssClassList
in favor ofcssClass
. - The
resumeToken
input field on thedeleteGravityFormsDraftEntry
,SubmitGravityFormsDraftEntry
, and all theupdateDraftEntry{fieldType}Value
mutations is now a non-nullableString!
.
- Refactored Fields, FieldValues, and Mutations, removing over 500 lines of code and improving consistency across classes.
- Switch to using
GFAPI::submit_form()
instead of local implementations for submitting forms and draft entries. - Implemented phpstan linting.
- Migrated unit tests to Codeception, and started backfilling missing tests.
- Updated composer dependencies.
- Removes
abstract
class definition from FieldProperty classes. (#79) ConsentFieldValue
: Thevalue
field was a conflicting typeBoolean
. Now it correctly returns aString
with the consent message. ( #80 )FormNotificationRouting
: ThefieldId
now correctly returns anInt
instead of aString
. (#81)- When checking for missing
GravityFormsForm
values,limitEntriesCount
,scheduleEndHour
andscheduleEndMinute
now correctly return as typeInt
(#83)
This release focuses on adding in missing mutations for existing form field - including those needed for Post Creation. We also added support for the Consent field, and squashed some bugs.
- Added
consentField
andupdateDraftEntryConsentFieldValue
.
- Added
updateDraftEntryChainedSelectFieldValue
mutation. - Added
updateDraftEntryHiddenFieldValue
mutation. - Added
updateDraftEntryPostCategoryFieldValue
mutation. - Added
updateDraftEntryPostContentFieldValue
mutation. - Added
updateDraftEntryPostCustomFieldValue
mutation. - Added
updateDraftEntryPostTagsFieldValue
mutation. - Added
updateDraftEntryPostTitleFieldValue
mutation.
- Added the
isHidden
property toPasswordInput
.
- Changed the way we were saving the
listField
values for both single- and multi-column setups, so GF can read them correctly. - Fix a bug where a PHP Notice would be thrown when no
listField
value was submitted - even if the field was not required. - Fixed a bug that was preventing unused draft signature images from getting deleted.
- Updated how we retrieve the signature url so we're no longer using deprecated functions.
- Renamed
ListInput
andListFieldValue
properties to something more sensical.input.value.values
is nowinput.value.rowValues
, andfieldValue.listValues.value
is nowfieldValue.listValues.values
. The old property names will continue to work until further notice. - Updated composer dependencies.
This release focuses on adding in missing properties on the existing form fields, and deprecating any properties that aren't used by Gravity Forms.
- Adds following properties to the Address field:
descriptionPlacement
,subLabelPlacement
,copyValuesOptionDefault
,copyValuesOptionField
,copyValuesOptionLabel
,enableCopyValuesOption
. - Adds following subproperties to the Address
inputs
property:customLabel
,defaultValue
,placeholder
. - Adds following properties to the Captcha field:
descriptionPlacement
,description
,size
,captchaType
. - Adds following properties to the ChainedSelect field:
descriptionPlacement
,description
,noDuplicates
,subLabel
. - Adds following properties to the Checkbox field:
descriptionPlacement
,enablePrice
. - Adds following properties to the Date field:
descriptionPlacement
,inputs
,subLabel
,dateType
. - Adds following properties to the Email field:
descriptionPlacement
,inputs
,subLabel
,emailConfirmEnabled
. - Adds following properties to the File Upload field:
descriptionPlacement
. - Adds following properties to the Hidden field:
allowsPrepopulate
. - Adds following properties to the HTML field:
displayOnly
,disableMargins
. - Adds following properties to the Name field:
descriptionPlacement
,subLabelPlacement
. - Adds following subproperties to the Name field
inputs
property:customLabel
,defaultValue
,placeholder
,choices
,enableChoiceValue
. - Adds following properties to the Number field:
descriptionPlacement
,calculationFormula
,calculationRounding
,enableCalculation
. - Adds following properties to the Page field:
displayOnly
,size
. - Adds following properties to the Password field:
subLabelPlacement
. - Adds following properties to the Phone field:
descriptionPlacement
. - Adds following properties to the Post Category field:
descriptionPlacement
,noDuplicates
,placeholder
. - Adds following properties to the Post Content:
descriptionPlacement
,maxLength
. - Adds following properties to the Post Custom field:
descriptionPlacement
,maxLength
. - Adds following properties to the Post Excerpt field:
descriptionPlacement
,maxLength
. - Adds following properties to the Post Image field:
descriptionPlacement
. - Adds following properties to the Post Tags field:
descriptionPlacement
,enableSelectAll
,maxLength
. - Adds following properties to the Post Title field:
descriptionPlacement
. - Adds following properties to the Radio field:
descriptionPlacement
,enablePrice
. - Adds following properties to the Section field:
descriptionPlacement
,displayOnly
. - Adds following properties to the Select field:
defaultValue
,descriptionPlacement
,enablePrice
. - Adds following properties to the Signature field:
descriptionPlacement
. - Adds following properties to the TextArea field:
descriptionPlacement
,useRichTextEditor
. - Adds following properties to the Text field:
descriptionPlacement
. - Adds following properties to the Time field:
descriptionPlacement
,inputs
,subLabelPlacement
. - Adds following properties to the Time field:
descriptionPlacement
.
These properties will be removed in v1.0.
- Deprecate the following properties from the Address field:
inputName
. - Deprecate the following properties from the Captcha field:
adminLabel
,adminOnly
,allowsPrepopulate
,visibility
. - Deprecate the following properties from the File Upload field:
allowsPrepopulate
,inputName
. - Deprecate the following properties from the Hidden field:
adminLabel
,adminOnly
,isRequired
,noDuplicates
,visibility
. - Deprecate the following properties from the HTML field:
adminLabel
,adminOnly
,allowsPrepopulate
,inputName
,visibility
. - Deprecate the following properties from the Name field:
inputName
. - Deprecate the following properties from the Page field:
adminLabel
,adminOnly
,allowsPrepopulate
,label
,visibility
. - Deprecate the following properties from the Password field:
allowsPrepopulate
,visibility
. - Deprecate the following properties from the Section field:
adminLabel
,adminOnly
,allowsPrepopulate
. - Deprecate the
key
property on all fieldinputs
properties. - Deprecate the following properties from the Chained Select field
inputs
property:isHidden
,name
.
- [Bugfix] Fix saving draft submission with wrong
gform_unique_id
when none is set. - [PHPCS] Various docblock and comment fixes.
This release takes the last year and a half of work on this plugin, and makes it ready for public consumption and contribution, by adopting SemVer, WordPress Coding Standards, etc.
Please see README.md for a list of all functionality.