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

Options values always empty #203

Closed
idflood opened this issue Jan 14, 2021 · 2 comments
Closed

Options values always empty #203

idflood opened this issue Jan 14, 2021 · 2 comments
Labels
Location Rules Issues related to ACF Location Rules Needs to be reproduced status: awaiting author response Additional information has been requested from the author

Comments

@idflood
Copy link

idflood commented Jan 14, 2021

I've created an ACF option page, registered it with 'show_in_graphql' => true and it appear in the graphiql schema.

But when I try to query this field it always return null.

When trying to debug the issue I've found that here the acf_get_field_groups function return the field definition but not the values.

If I try to add a print_r(get_fields('options')) I see that the values are present but not loaded with this function.

Another thing (maybe related), the query needed looks like it and is not really similar to the different documentations about this feature:

generalSettings {
    siteSettings {
      test
    }
  }

Wordpress 5.6
Advanced Custom Fields PRO 5.9.3
WP GraphQL 1.1.2
WPGraphQL for Advanced Custom Fields 0.3.5

@jasonbahl
Copy link
Contributor

@idflood can you provide the code you used to register the ACF options page as well as the Field Group config?

the generalSettings is a core field for querying settings under WordPress Settings > General page.

ACF Options have their own root entry in the Graph under their own name.

@jasonbahl jasonbahl added status: awaiting author response Additional information has been requested from the author Location Rules Issues related to ACF Location Rules labels Mar 26, 2021
@jasonbahl jasonbahl added this to the ACF Schema Location Rules milestone Mar 30, 2021
@jasonbahl jasonbahl removed this from Upcoming in ACF Schema Location Rules Mar 30, 2021
@jasonbahl
Copy link
Contributor

I'm not able to reproduce this, and with v0.5.0 (#250( there are tests for Options Pages.

If there are steps to consistently reproduce this, please open another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Location Rules Issues related to ACF Location Rules Needs to be reproduced status: awaiting author response Additional information has been requested from the author
Projects
None yet
Development

No branches or pull requests

2 participants