Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 of 3 tasks
jasonbahl opened this issue Jun 10, 2024 · 2 comments · May be fixed by #221
Open
2 of 3 tasks

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

jasonbahl opened this issue Jun 10, 2024 · 2 comments · May be fixed by #221
Assignees
Labels
status: actionable Ready for work to begin type: bug Issue that causes incorrect or unexpected behavior

Comments

@jasonbahl
Copy link
Contributor

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.

  • Yes

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

  • Yes
  • My issue is with compatibility with a specific WordPress plugin, and I have listed all my installed plugins (and version info) above.
@josephfusco josephfusco added type: bug Issue that causes incorrect or unexpected behavior status: actionable Ready for work to begin labels Jun 11, 2024
@jasonbahl jasonbahl linked a pull request Jun 25, 2024 that will close this issue
@kevchcm
Copy link

kevchcm commented Jun 26, 2024

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

@josephfusco
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: actionable Ready for work to begin type: bug Issue that causes incorrect or unexpected behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants