This patch release fixes compatibility with Composer-based WordPress installations, and a few minor issues introduced in the previous release.
- fix: Check if classes are loaded by a different autoloader before attempting to autoload them. H/t @cvanh
- fix: Return
wp_max_upload_size()
instead ofnull
ifGfFieldWithFileSizeSetting.maxFileSize
isnull
. H/t @Gytjarek - fix: Fix typo in Autoloader release URL.
- fix: Ensure a valid source ID exists before attempting to resolve a
connectedFormField
. - ci: Test compatibility against WP 6.6.
- ci: Replace calls to
docker-compose
withdocker compose
.
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.
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.
Note: As a result of these changes, the following minimum versions have been bumped:
- WPGraphQL: v1.26.0
- WordPress: v6.0.0
- Gravity Forms: v2.7.0
-
We've added support for the Gravity Forms Block when using WPGraphQL Content Blocks, by exposing the
GfForm
on theGravityformsFormAttributes.form
field. -
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.- 🚨 Breaking: The deprecated (int)
FormField.id
has been reinstated as a relay-compliantID
. If you are still usingid
as the integer database ID, you will need to update your queries to useFormField.databaseId
. - 🚨 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 theModel
's fields for better performance and reliability. - 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:- Added the
FieldError.connectedFormField
field. - Deprecated (int)
GfFieldWithProductFieldSetting.productField
in favor of.connectedProductField
. - Updated our existing
.connectedFormField
s across the schema to use the new Dataloader. - Exposed
SubmitGfFormPayload.targetPageFormFields
to help with multi-page form support. See notes below for more information.
- Added the
- 🚨 Breaking: The deprecated (int)
-
🚨 Breaking: We've improved the DX for
FormField.choices
and.inputs
by narrowing down the field definitions on the implementing Types. For example, instead ofCheckboxField.choices
resolving to a genericGfFieldChoice
interface, it now resolves directly to `CheckboxFieldChoice.Note: If your queries are checking for "impossible" interfaces, (e.g.
... on ListFieldChoice
on aCheckboxField.choices
query), you will need to update your queries. A full list of breaking schema changes can be found below. -
We've improved the DX and handling of multi-page forms:
-
🚨 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.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. -
We've added
targetPageNumber
andtargetPageFormFields
to theSubmitGfFormPayload
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.
-
-
🚨 Breaking: We've refactored the
EntriesConnectionResolver
andFormsConnectionResolver
classes to use the new API methods available as of WPGraphQL v1.26.0, leading to improved performance and reliability.Note: If you are extending these classes in your custom code, you will need to update your code to match the new method signatures.
-
🚨 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:
- Deprecated GraphQL fields:
FormsConnectionOrderbyInput.field
,GfFieldWithDisableQuantitySetting.isQuantityDisabled
.GfSubmittedEntry.entryId
.GfForm.button
,gfForm.entryId
,gfForm.lastPageButton
. - Deprecated hooks:
graphql_gf_form_modeled_data_experimental
,graphql_gf_form_field_setting_properties
,graphql_gf_form_field_value_properties
. - Deprecated helper methods:
GFUtils::handle_file_upload()
.
- Deprecated GraphQL fields:
- Field
FormField.id
changed type fromInt!
toID!
- Field
{$TYPE}Field.inputs
changed type from[GfFieldInput]
to[{$TYPE}InputProperty]
- Field
{$TYPE}Field.choices
changed type from[GfFieldChoice]
to[{$TYPE}FieldChoice]
- Field
values
(deprecated) was removed from object typeFileUploadField
- Input field
field
(deprecated) was removed from input object typeFormsConnectionOrderbyInput
- Field
isQuantityDisabled
(deprecated) was removed from interfaceGfFieldWithDisableQuantitySetting
- Field
button
(deprecated) was removed from object typeGfForm
- Field
formId
(deprecated) was removed from object typeGfForm
- Field
lastPageButton
(deprecated) was removed from object typeGfForm
- Field
entryId
(deprecated) was removed from object typeGfSubmittedEntry
- fix: Add missing descriptions to various GraphQL types.
- fix: Check for Submission Confirmation url before attempting to get the associated post ID.
- fix: Flush static Gravity Forms state between multiple calls to
GFUtils::submit_form()
. - fix: Handle
RadioField
submission values when using a custom "other" choice. H/t @Gytjarek .
- dev: Add new
graphql_gf_activate
andgraphql_gf_deactivate
actions. - dev: Deprecate
FieldValues::is_field_and_entry()
and remove internal usage. - dev: Remove
vendor
directory from the GitHub repository, and improve plugin initialization and autoload handling. - dev: use
WP_Filesystem
to handle Signature field uploads. - chore: Declare
strict_types
in all PHP files, add type hints to all iterable types. and fix exposed type errors. - chore: Update Composer dev-dependencies and fix test compatibility with
wp-graphql-test-case
v3.0.x. - chore: Update PHP interfaces and Abstract classes with better type hints.
- chore!: Bump minimum Gravity Forms version to v2.7.0.
- chore!: Bump minimum WordPress version to v6.0.0.
- chore!: Bump minimum WPGraphQL version to v1.26.0.
- tests: Add test for
GFUtils::get_last_form_page()
.
This patch release fixes the version number in the plugin header, which was incorrectly set to 0.12.5
instead of 0.12.6
.
- fix: Correct version number in plugin header.
This minor release adds explicit support for PHP 8.2 and WordPress 6.5 - including the new Plugin Dependency header. Additionally, we've updated the Composer dependencies, and improved code quality and type safety.
- feat: Add plugin dependency header.
- chore: Update Composer deps and lint.
- chore: Lock WPBrowser to <3.5.0 to prevent conflicts with Codeception.
- chore: Implement strict PHPStan rules and fix resulting issues.
- chore: Add traversable type hints throughout the codebase.
- tests: Lint tests.
- ci: Update GitHub Actions to latest versions.
- ci: Test plugin compatibility with WordPress 6.5.0.
- ci: Test plugin compatibility with PHP 8.2.
This minor release fixes a bug where EmailField.inputs
were returning null
when Email Confirmation is disabled and an issue where formFields
were not being correctly filtered by their where
args. We've also updated the Composer dependencies, did some code linting, and tested compatibility against WordPress 6.4.x.
- fix: Ensure
EmailField
inputs are hydrated when Email Confirmation is disabled. H/t @gytjarek. - fix: Correctly use filtered form fields when preparing the connection data. H/t @samuelhadsall.
- chore: Update
yahnis-elsts/plugin-update-checker
to v5.3. - chore: Update
axepress/wp-graphql-cs
to v2.0.0-beta.2 and fix resulting issues. - chore: Update Composer dev deps.
- ci: Test compatibility with WordPress 6.4.x
- docs: Add docs on troubleshooting i18n issues. H/t @dev-ditrict-web.
This minor release fixes a bug where updating the plugin via the WordPress backend would fail due to changes to GitHub's API.
Note: Users relying on WordPress's built-in plugin update mechanism will need to update manually to this version by downloading the release zip.
- fix: Fix installation errors when upgrading plugin via the WordPress backend. H/t @shaderpixel.
- chore: Update
yahnis-elsts/plugin-update-checker
to v5.2. - ci: Include top-level plugin folder in release zip.
This minor release fixes a few bugs when resolving GfEntry
data, and addresses some code smells from the updated WPGraphQL Coding Standards. We're also now testing the plugin against WordPress 6.3 and PHP 8.1.
- fix: Check if entries exist before resolving the connection
count
. - fix: Improve type checks when calculating the
QuizResults
data. - fix: Pass the entry array to the
QuizResults
resolver. - chore: Fix Composer PHP version constraints and rebuild lockfile. Thanks @szepeviktor!
- chore: Update WPGraphQL Coding Standards to 2.0.0-beta.1 and fix resulting issues.
- chore: Update Composer dev-deps.
- chore: Update links to repo and README.
- tests: Set
WPLoader.loadOnly
to true for acceptance suite. Thanks @lucatume! - ci: Fix GitHub Action workflows by locking MariaDB version to v10.
- ci: Test against WordPress 6.3 and PHP 8.1
This minor release expands the ability to use database and global IDs interchangeably in more connections. We also now prime the GFFormsLoader
dataloader, reducing the number of database queries and improving performance.
We've also implemented the new WPGraphQL Coding Standards ruleset for PHP_CodeSniffer
. While many of the (over 1000+) addressed sniffs are cosmetic, numerous smells regarding performance, type safety, sanitization, and 3rd-party interoperability have been fixed as well.
- dev: Refactor database ID resolution when the GraphQL
ID
type is indeterminate. Note: The following input args now work with both database and global IDs:GfEntriesConnectionWhereArgs.formIds
,GfFormsConnectionwhereArgs.formIds
. - dev: Remove usage of deprecated
WPGraphQL\Data\DataSource::resolve_post_object()
method. - dev: Prime the GfForm dataloader when querying form connections, to prevent unnecessary database queries.
- chore: Implement
axepress/wp-graphql-cs
PHP_Codesniffer ruleset, and fix all resulting issues. - docs: Add missing documentation regarding using
productValues
input when submitting forms.
This minor release fixes an issue where certain complex Field Input and Field Choice types would try to implement a non-existent parent inteface, causing GraphQL debug messages to be returned in the response.
- fix: Use local store for
FieldInputRegistry
andFieldChoiceRegistry
to prevent the registration of duplicate/nonexistent types. - chore: Update Composer dev deps.
- test: Ensure no
extensions['debug']
messages are returned when querying FormFields. - ci: Test against WordPress 6.2
- ci: Ignore
graphql-schema-linter
error forFormFieldConnection.pageInfo
missing a description. This will be reverted once FormFieldConnection is refactored to be a Relay-compatible.
This major release refactors the way Gravity Forms fields are registered in GraphQL, by using GraphQL interfaces derived from the Forms Field Settings to register the fields, choices, and inputs tp the type. This allows for more flexibility in how fields are registered and consumed, and for DRYer GraphQL queries and frontend components.
This release also adds explicit support for Pricing Fields. Specifically, we've added support for the Option
, Product
, Quantity
, Shipping
, and Total
fields, and the orderSummary
field on GfEntry
.
Lastly, we've exposed the connectedChoice
and connectedInput
fields on CheckboxFieldValue
objects, added some additional test coverage, and squashed a few bugs along the way.
Note: The minimum version of WPGraphQL has been bumped to v1.9.0.
- 🚨 Breaking: We've refactored the way Gravity Forms fields are registered in GraphQL, by using GraphQL interfaces derived from the Gravity Forms Field Settings. Note: This is a breaking change, and will require you to update your GraphQL queries for
formField.choices
andformField.inputs
to use the newFormFieldChoice
andFormFieldInput
interfaces, respectively. - We've added explicit support for the
Option
,Product
,Quantity
,Shipping
, andTotal
Gravity Forms fields. - We've added the new
orderSummary
field toGfEntry
objects, which contains all the order details for the form submission. - We've exposed the
connectedChoice
andconnectedInput
fields toCheckboxFieldValue
objects, to make it easier to access specific values of the selected choices and inputs without hacky workarounds. - We've deprecated the
FormField.id
field in favor ofFormField.databaseId
, which is more consistent with WPGraphQL's naming conventions. Note:FormField.id
will change its type to a global (Relay) ID in an upcoming release.
- Field
AddressField.defaultProvince
changed type from String toAddressFieldProvinceEnum
. - Field
AddressField.defaultState
changed type from String toAddressFieldProvinceEnum
. - All
{FieldType}.inputs
fields changed type from[AddressInputProperty]
to[GfFieldInput]
. - Field
{FieldType}.choices
changed type from[ChainedSelectFieldChoice]
to[GfFieldChoice]
. - Enum value
SUBMIT
was removed from enumFormFieldTypeEnum
. - 🚨 Breaking:
PostCategoryFieldChoice
kind changed fromObjectTypeDefinition
toInterfaceTypeDefinition
. - Type
PostCategoryInputProperty
was removed. - Type
PostCustomInputProperty
was removed. - Type
PostTagsInputProperty
was removed. QuizFieldChoice
kind changed fromObjectTypeDefinition
to InterfaceTypeDefinition.- Type
QuizInputProperty
was removed. - Type
SubmitField
was removed.
- fix: Ensure latest mutation input data is used to prepare the field values on update mutations.
- fix: Check for falsy
personalData
when resolving the form model.
- feat: Deprecate
FormsConnectionOrderbyInput.field
in favor ofFormsConnectionOrderbyInput.column
- feat!: Update minimum required WPGraphQL version to v1.9.0.
- dev!: Move
TypeRegistry
classes toWPGraphQL\GF\Registry
namespace. - dev!: Register each GraphQL type on its own
add_action()
call. - dev!: Remove nullable
$type_registry
param fromRegistrable::register()
interface method. - dev!: Remove the
$type_registry
param from thegraphql_gf_after_register_types
andgraphql_gf_before_register_types
actions. - dev!: Remove the
PropertyMapper
,ChoiceMapper
,InputMapper
, andFieldProperties
PHP classes in favor of theFormFieldRegistry
,FieldInputRegistry
andFieldChoiceRegistry
classes. - dev!: Check if plugin dependences meet the minimum version requirements.
- dev: Add following actions:
graphql_gf_after_register_form_field
,graphql_gf_after_register_form_field_object
. - dev: Add the following filters:
graphql_gf_form_field_settings_with_inputs
graphql_gf_form_field_settings_with_choices
graphql_gf_form_field_setting_choice_fields
,graphql_gf_form_field_setting_input_fields
,graphql_gf_registered_form_field_setting_classes
,graphql_gf_registered_form_field_setting_choice_classes
,graphql_gf_registered_form_field_setting_input_classes
. - dev: Deprecate the
graphql_gf_form_field_setting_properties
filter in favor ofgraphql_gf_form_field_setting_fields
. - dev: Deprecate the
graphql_gf_form_field_value_properties
filter in favor ofgraphql_gf_form_field_value_fields
. - chore: Refactor
FormsConnectionResolver
to use newAbstractConnectionResolver
methods. - chore: Add
automattic/vipcs
Code Standard ruleset. - ci: Update GitHub Action versions used in workflows to latest.
- ci: Update Node version to 16+.
- ci: Run actions on organization repository.
- ci: Add coverage to Code Climate.
- ci: Set config to skip GF Setup screen.
- tests: Rename FormFieldTestCase test methods for specificity.
- tests: Format and harden.
- tests: Add tests for
submitGfForm
mutation. - docs: replace
formId
withid
insubmitGfForm
examples. Props: @mosesintech
This minor release fixes a bug where the ip
field on GfEntry
was not being properly stored when submitting a form.
- fix: Properly store provided IP when submitting an entry. Thanks @marcusforsberg !
- chore: Update composer deps.
This minor release adds compatibility for Gravity Forms v2.6.8+ by refactoring the internal logic used for uploading files to use native Gravity Forms methods whenever possible.
- fix: Refactor File Upload logic for compatibility with Gravity Forms 2.6.8+.
- chore: Update composer deps.
This minor release adds compatibility for WPGraphQL v1.13.x, by removing the new Connection
, Edge
, and OneToOneConnection
interfaces from the FormField
connections. This is a temporary fix, and will be reverted in a future release.
- fix: remove incompatible interfaces from
FormField
connections. - fix: remove redundant
There was an error while processing the form.
prologue from submissionUserError
s. - chore: update Composer deps.
- chore: fix PHPStan issues surfaced by new Composer deps.
This minor release fixes an issue where querying for NumberField.calculationRounding
would sometimes throw an error when Rounding
is set to Do not round
.
- fix: explicitly set
calculationRounding
tonull
when rounding is disabled. - chore: update Composer deps.
This minor release fixes an issue with the GraphQL dataloader storing the GF form, instead of the 'prerendered' version used by many 3rd-party plugins. It also fixes FormQuiz
GraphQL fields from resolving if they are not associated with the current gradingType
(e.g. passPercent
on a LETTER
grade ).
- fix: Run
gform_pre_render
on Form objects before they are stored in the DataLoader. - fix: FormQuiz fields should return null is not associated with current
gradingType
. - chore: Update Composer deps.
This minor release fixes a bug where the resolver for FormField.choices
wasn't always correctly parsing and passing the data, causing GraphQL fields on Quiz and Chained Select choices to return incorrect values.
- fix:
FormField.choices
doesn't always resolve values correctly. - chore: replace abandoned
poolshark/wp-graphql-stubs
Composer dependency withaxewp/wp-graphql-stubs
.
This minor release fixes a bug where gfForm.quiz
data was not resolving, as well as GraphQL types for FormQuizConfirmation
fields.
Note: This release is technically a breaking schema change, however since those fields are entirely unusable with their current type definitions, we don't expect this have any negative impact on users when upgrading.
- (#314) fix!: Change GraphQL field
FormQuizConfirmation.isAutoformatted
from typeString
to typeBoolean
. - (#314) fix!: Change GraphQL field
FormQuizConfirmation.message
from typeInt
to typeString
. - (#314) fix: Fix resolver for
GfForm.quiz
returning empty data. - (#314) test: Add basic WPUnit tests for
GfForm.quiz
data. - (#315) test: Fix
FormConnectionQueriesTest
classname corrupted after backporting from v0.11.4
This minor release fixes a bug where gfForm.entries
would return entries from all forms, among other things.
- (#291) feat: Update
plugin-update-checker
tov4.13
and enable use of local assets on Dashboard screen. - (#307) fix: ensure form->entry connections only return entries on that form.
- (#307) fix: change
formIds
input description to clarify that it (currently) only accepts database IDs. - (#304) chore: update Composer deps.
- (#307) test: ensure
$_gf_state
is reset between tests. - (#307) test: add some extra WPUnit tests for form/entry connection where args.
This minor release fixes a bug where gfEntries.pageInfo
fields would have incorrect data after upgrading to WPGraphQL v1.9.0.
Note: As a result of WPGraphQL v1.9.0, the order of items returned when using backwards pagination (e.g. last:5
) is now reversed and identical to the order of items returned when using forward pagination, as per the GraphQL Relay spec.
- fix: Refactor
EntriesConnectionResolver
to support WPGraphQL v1.9.0. - test: refactor
gfForms
andgfEntries
pagination tests.
This minor release fixes a bug where querying for a non-existent Form/Entry id would throw an error instead of returning null
.
We also added some new GraphQL fields and connections to the FormConfirmation
and SubmissionConfirmation
types, and made some under-the-hood improvements to both the code and our build scripts.
- feat: Add
isAutoformatted
to theFormConfirmation
object. - feat: Add
Page
connection to theFormConfirmation
object. (h/t @robmarshall ) - feat: Add
pageId
andqueryString
fields andPage
connection to theSubmissionConfirmation
object. - fix: Ensure DataLoader keys return null on non-existent objects, instead of throwing errors. (h/t 6x x6 and Jonathan Ng )
- dev: Fix return type for
Utils::get_possible_form_field_child_types()
. - dev: Refactor ignored Gravity Forms settings to
FormFields::ignored_gf_settings()
. - dev: Ensure composer deps are built for PHP 7.4.
- chore: Update Composer deps.
- docs: Add usage example for file uploads.
- ci: Various improvements to workflows.
This hotfix release fixes issues with the Github Updater attempting to install plugin updates from the wrong release asset.
- fix: ensure results of graphql_gf_update_repo_url are always trailing-slashed.
- chore: add Composer command for generating plugin .zip
- chore: add Github Action for adding plugin .zip to release.
This minor release adds the reCaptcha V2 type
and publicKey
to gfSettings.recaptcha
, the validated confirmation
response to form submission mutation payloads, and fixes a handful of bugs.
- feat: Add
recaptcha
settings toGFSettings
GraphQL object. - feat: Add
SubmissionConfirmation
object tosubmitGfForm
andsubmitGfDraftEntry
mutation responses. Props: @KoduVaal - fix:
isActive
should default to true for new Confirmations / Notifications. - fix: Correctly resolve the
rangeMin
andrangeMax
GraphQL fields onNumberField
. (h/t @natac13 ) - fix: Ensure GF Action Monitor setting keys are populated.
- fix: Ensure
checkboxValues
load the Post Category choices before attempting to process. - fix: Prevent reprocessing the
imageValueInput.url
when updatingPostImage
field values. - tests: Fix broken test asserts exposed by PHPUnit v9 + WPGraphQL Test Case v2.3
- tests: Use
gravityformscli
for installing GF plugins in test envs. - chore: Upgrade composer deps
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: "myemail@email.test"
+ emailValues: {
+ value: "myemail@email.test"
+ confirmationValue: "myemail@email.test" # 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.