You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+118-6Lines changed: 118 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,127 @@
1
1
# Changelog
2
2
3
+
## v0.4.0 - A Simpler Form Submission Flow!
4
+
5
+
**:warning: This release contains multiple breaking changes. **
6
+
7
+
This release adds the `submitGravityFormsForm` mutation that submit forms without needing to use the existing `createGravityFormsDraftEntry` -> `updateDraftEntry{fieldType}Value` -> `submitGravityFormsDraftEntry` flow.
8
+
9
+
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.
10
+
11
+
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.
12
+
13
+
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.
14
+
15
+
### New features
16
+
17
+
- Added `submitGravityFormsForm` mutation to bypass the existing draft entry flow. See [README.MD](https://github.com/harness-software/wp-graphql-gravity-forms/README.md#documentation-submit-form-mutation) for usage.
18
+
- Added `updateGravityFormsEntry` and `updateGravityFormsDraftEntry` mutations that follow the same pattern.
19
+
- Added `idType` to `GravityFormsForm` and `GravityFormsEntry`, so you can now query them using the database ID, instead of generating a global id first.
20
+
- Added `id` property to `FieldErrors`, so you know which failed validation.
21
+
- Deprecated the `fields` property on `GravityFormsForm` and `GravityFormsEntry` in favor of `formFields`.
22
+
- Support cloning an existing entry when using `createGravityFormsDraftEntry` using the `fromEntryId` input property.
23
+
- Converted all Gravity Forms `formFields` (and the now-deprecated `fields`) to a GraphQL Interface type. That means your queries can now look like this:
24
+
25
+
```graphql
26
+
query {
27
+
gravityFormsForms {
28
+
nodes {
29
+
formFields {
30
+
nodes {
31
+
formId
32
+
type
33
+
id
34
+
...onAddressField {
35
+
inputs {
36
+
defaultValue
37
+
}
38
+
}
39
+
...onTextField {
40
+
defaultValue
41
+
}
42
+
}
43
+
}
44
+
}
45
+
}
46
+
}
47
+
```
48
+
49
+
- Switched many field types from `String` to `Enum`:
50
+
-`AddressField.addressType`
51
+
-`Button.type`
52
+
-`CaptchaField.captchaTheme`
53
+
-`CaptchaField.captchaType`
54
+
-`CaptchaField.simpleCaptchaSize`
55
+
-`ChainedSelectField.chainedSelectsAlignment`
56
+
-`ConditionalLogic.actionType`
57
+
-`ConditionalLogic.logicType`
58
+
-`ConditionalLogicRule.operator`
59
+
-`DateField.calendarIconType`
60
+
-`DateField.dateFormat`
61
+
-`DateField.dateType`
62
+
-`EntriesFieldFilterInput.operator`
63
+
-`EntriesSortingInput.direction`
64
+
-`Form.descriptionPlacement`
65
+
-`Form.labelPlacement`
66
+
-`Form.limitEntriesPeriod`
67
+
-`Form.subLabelPlacement`
68
+
-`FormConfirmation.type`
69
+
-`FormNotification.toType`
70
+
-`FormNotificationRouting.operator`
71
+
-`FormPagination.style`
72
+
-`FormPagination.type`
73
+
-`GravityFormsEntry.fieldFiltersNode`
74
+
-`GravityFormsEntry.status`
75
+
-`NumberField.numberFormat`
76
+
-`PasswordField.minPasswordStrength`
77
+
-`PhoneField.phoneFormat`
78
+
-`RootQueryToGravityFormsFormConnection.status`
79
+
-`SignatureField.borderStyle`
80
+
-`SignatureField.borderWidth`
81
+
-`TimeField.timeFormat`
82
+
-`visibilityProperty`
83
+
- FieldProperty: `descriptionPlacement`
84
+
- FieldProperty: `labelPlacement`
85
+
- FieldProperty: `sizeProperty`
86
+
87
+
### Bugfixes
88
+
89
+
-`SaveAndContinue` now uses `buttonText` instead of the `Button` type.
90
+
-`lastPageButton` now uses its own GraphQL type with the relevant fields.
91
+
- The `resumeToken` input field on the `deleteGravityFormsDraftEntry`, `SubmitGravityFormsDraftEntry`, and all the `updateDraftEntry{fieldType}Value` mutations is now a non-nullable `String!`.
92
+
- When querying entries, we check that `createdByID` is set before trying to fetch the uerdata.
93
+
- Where possible, mutations and queries now try to return an `errors` object instead of throwing an Exception.
94
+
- We've added more descriptive `Exception` messages across the plugin, to help you figure out what went wrong.
95
+
- We fixed a type conflict with `ConsentFieldValue`. `value` now returns a `String` with the consent message, or `null` if false.
96
+
- Deprecated `url` in favor of `value` on `FileUploadFieldValue` and `SignatureFieldValue`.
97
+
- Deprecated `cssClassList` in favor of `cssClass`.
98
+
- The `resumeToken` input field on the `deleteGravityFormsDraftEntry`, `SubmitGravityFormsDraftEntry`, and all the `updateDraftEntry{fieldType}Value` mutations is now a non-nullable `String!`.
99
+
100
+
### Under the hood
101
+
102
+
- Refactored Fields, FieldValues, and Mutations, removing over 500 lines of code and improving consistency across classes.
103
+
- Switch to using `GFAPI::submit_form()` instead of local implementations for submitting forms and draft entries.
104
+
- Implemented phpstan linting.
105
+
- Migrated unit tests to Codeception, and started backfilling missing tests.
106
+
- Updated composer dependencies.
107
+
3
108
## v0.3.1 - Bugfixes
4
-
- Removes `abstract` class definition from FieldProperty classes. (#79)
5
-
-`ConsentFieldValue`: The `value` field was a conflicting type `Boolean`. Now it correctly returns a `String` with the consent message. ( #80 )
6
-
-`FormNotificationRouting`: The `fieldId` now correctly returns an `Int` instead of a `String`. (#81)
7
-
- When checking for missing `GravityFormsForm` values, `limitEntriesCount`, `scheduleEndHour` and `scheduleEndMinute` now correctly return as type `Int` (#83)
109
+
110
+
- Removes `abstract` class definition from FieldProperty classes. (#79)
111
+
-`ConsentFieldValue`: The `value` field was a conflicting type `Boolean`. Now it correctly returns a `String` with the consent message. ( #80 )
112
+
-`FormNotificationRouting`: The `fieldId` now correctly returns an `Int` instead of a `String`. (#81)
113
+
- When checking for missing `GravityFormsForm` values, `limitEntriesCount`, `scheduleEndHour` and `scheduleEndMinute` now correctly return as type `Int` (#83)
114
+
8
115
## v0.3.0 - Add Missing Mutations, the Consent Field, and more!
9
116
10
117
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.
11
118
12
119
### New Field Support: Consent
120
+
13
121
- Added `consentField` and `updateDraftEntryConsentFieldValue`.
- Added the `isHidden` property to `PasswordInput`.
134
+
135
+
- Added the `isHidden` property to `PasswordInput`.
26
136
27
137
### Bugfixes
138
+
28
139
- Changed the way we were saving the `listField` values for both single- and multi-column setups, so GF can read them correctly.
29
-
- Fix a bug where a PHP Notice would be thrown when no `listField` value was submitted - even if the field was not required.
140
+
- Fix a bug where a PHP Notice would be thrown when no `listField` value was submitted - even if the field was not required.
30
141
- Fixed a bug that was preventing unused draft signature images from getting deleted.
31
142
- Updated how we retrieve the signature url so we're no longer using deprecated functions.
32
143
33
144
### Misc.
145
+
34
146
- Renamed `ListInput` and `ListFieldValue` properties to something more sensical. `input.value.values` is now `input.value.rowValues`, and `fieldValue.listValues.value` is now `fieldValue.listValues.values`. The old property names will continue to work until further notice.
0 commit comments