Skip to content

Conversation

@jasonbahl
Copy link
Contributor

What does this implement/fix? Explain your changes.

This fixes a bug with ACF Field Groups assigned to a Page Template not resolving correctly.

Does this close any currently open issues?

closes #110

Any relevant logs, error output, GraphiQL screenshots, etc?

Before

The Field Group is queryable on the template, but the fields return null

CleanShot 2023-11-03 at 13 38 16

After

The Field Group is queryable on the template, and the fields return expected values

CleanShot 2023-11-03 at 13 37 20

Any other comments?

The previous version of the plugin included this filter (see: https://github.com/wp-graphql/wp-graphql-acf/blob/develop/src/class-acf.php#L132-L144), but it wasn't properly ported over.

…template resolver so ACF can properly resolve fields on the template object using the passed down "node" as the object to resolve fields from.
@github-actions
Copy link

github-actions bot commented Nov 3, 2023

Pull Request Test Coverage Report for Build 6bcfbc457c95454ee5e905f1c148906fda4125a8-PR-112

  • 6 of 7 (85.71%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 62.298%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/WPGraphQLAcf.php 5 6 83.33%
Totals Coverage Status
Change from base Build 31c56c6faf613c623532513491a458bcf6006607: 0.04%
Covered Lines: 2006
Relevant Lines: 3220

💛 - Coveralls

@jasonbahl jasonbahl merged commit d09512b into main Nov 6, 2023
@jasonbahl jasonbahl deleted the fix/#110-field-groups-on-page-templates-not-resolving branch January 24, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data not resolving when fields are assigned to a Page Template

2 participants