verbb / formie

The most user-friendly forms plugin for Craft CMS.
Other
93 stars 69 forks source link

Unable to obtain Dropdown, Checbox and Radio options in GraphQL [3.0] [Craft 5] #1759

Closed davidwebca closed 3 months ago

davidwebca commented 3 months ago

Describe the bug

After creating a form with dropdown, radio or checkbox fields, it's impossible to get their "options" field in GraphQL, an error gets returned:

Cannot query field \"options\" on type \"Field_Radio\".

(seems like it affects the ones that implemented BaseOptionsField in previous versions)

Steps to reproduce

  1. Create a new form
  2. Add checkbox, dropdown and radio fields with options filled-in
  3. Try to query with GraphQL
  4. Notice that there's no "options" sub field

Form settings

Craft CMS version

5.0.0-beta.6

Plugin version

3.0.0-beta.3

Multi-site?

Yes

Additional context

Here's the list of plugins I have in the same project right now.

Name                   Handle                 Package Name                    Version                 Installed  Enabled
---------------------  ---------------------  ------------------------------  ----------------------  ---------  -------
CKEditor               ckeditor               craftcms/ckeditor               4.0.0-beta.7            Yes        Yes
Colorit                colorit                presseddigital/colorit          dev-master              Yes        Yes
Entry GPS Coordinates  entry-gps-coordinates  nthmedia/entry-gps-coordinates  dev-master              Yes        Yes
Field Manager          field-manager          verbb/field-manager             4.0.0-beta.1            Yes        Yes
Formie                 formie                 verbb/formie                    3.0.0-beta.2            Yes        Yes
Hyper                  hyper                  verbb/hyper                     2.0.0-beta.2            Yes        Yes
Icon Picker            icon-picker            verbb/icon-picker               3.0.0-beta.2            Yes        Yes
Navigation             navigation             verbb/navigation                3.0.0-beta.1            Yes        Yes
oEmbed                 oembed                 wrav/oembed                     dev-feature/gql-params  Yes        Yes
Route Map              route-map              nystudio107/craft-routemap      dev-craft-5             Yes        Yes
SEOmatic               seomatic               nystudio107/craft-seomatic      dev-develop-v5          Yes        No
engram-design commented 3 months ago

Fixed for the next release. To get this early, run composer require verbb/formie:"dev-craft-5 as 3.0.0-beta.3".

davidwebca commented 3 months ago

Great! Am I insane or is it not in GitHub yet though? composer require verbb/formie:"dev-craft-5 as 3.0.0-beta.3" doesn't seem to pull anything new 🤔

engram-design commented 3 months ago

Sorry, you're right - that didn't seem to actually push to GitHub. Should be there now.

davidwebca commented 3 months ago

Great thanks! I'm getting more errors for Address, Name and Date fields now that I pushed through these, namely Cannot query field for every sub fields on these types.

engram-design commented 3 months ago

Ah, sorry, it's probably because I'm in the middle of refactoring sub-fields. I'll get that sorted ASAP.

engram-design commented 3 months ago

Fixed in 3.0.0-beta.4