wp-graphql / wpgraphql-acf

Re-architecture of WPGraphQL for ACF
GNU General Public License v3.0
73 stars 10 forks source link

Page Link field type should return a string, NOT a connection #213

Open jasonbahl opened 1 month ago

jasonbahl commented 1 month ago

Description

The "Page Link" type currently maps to the Schema as an AcfContentNodeConnection type, but the Field is documented as returning a string to a link and recommends using the "Post Object" field type if more rich data is needed.

Steps to reproduce

  1. create an ACF Field Group with a field of the "Page Link" field type
  2. see the field is exposed in the schema as a "AcfContentNodeConnection" type in the schema
  3. try to query the field and always get null results

The expected behavior for the field type is a link, not a page "node" object.

The field should be corrected to return a string instead of a connection to a Content Node.

PHP or JSON export of the ACF Field Group(s)

No response

Additional context

related: #208

WPGraphQL Version

1.27.0

WPGraphQL For ACF Version

2.3.0

ACF (Advanced Custom Fields) Version. Free or Pro?

6.3.1.2 (PRO)

WordPress Version

6.5.4

PHP Version

8.2

Additional enviornment details

No response

Please confirm that you have searched existing issues in the repo.

Please confirm that you have disabled ALL plugins except for WPGraphQL, WPGraphQL For ACF, ACF, etc.

kevchcm commented 3 weeks ago

Was the issue solved? I'm having issues with the page link field returning null.