• Hi,

    I’ve created a new Options Page using the ACF menu and linked a new field group to it. The field group contains a repeater field with text fields inside. We have two identical environments.

    On the development environment, after setting everything up and populating the fields with data, the GraphQL IDE successfully retrieves and displays the correct data. However, after exporting the WordPress settings from the development environment to staging, the following issue occurs:

    In the GraphQL IDE on the staging environment, all fields are visible in the Query Composer, but no data is returned.

    To troubleshoot, I created a test example directly on the staging environment by linking a new field group to the Options Page. Unfortunately, GraphQL still does not return any data.

    In options page editor data are visible and it seems that GraphQL correctly recognizes the fields and the Options Page itself but does not retrieve the populated data.

    Could you please assist me in resolving this issue?

Viewing 1 replies (of 1 total)
  • Hello bartoszqodeca,

    You created an Options Page using ACF and linked a field group with a repeater field. While everything works fine on the development environment, the staging environment’s GraphQL IDE shows the fields but doesn’t return any data. Even after testing with a new field group, GraphQL fails to retrieve populated data on the staging environment.

    This issue likely stems from missing or misconfigured settings after migrating from development to staging. Follow these steps to resolve it:

    1. Validate ACF GraphQL Settings

    Ensure that the ACF field group and fields are correctly exposed to GraphQL:

    • Navigate to Custom Fields → Field Groups in the staging environment.
    • Edit the field group linked to the Options Page.
    • Check the GraphQL Settings for the following:
      • Show in GraphQL: Ensure this option is enabled.
      • GraphQL Field Name: Verify it is correctly defined and unique.
    • Save the field group even if no changes were made to force a configuration refresh.

    2. Regenerate the GraphQL Schema

    The GraphQL schema may require regeneration to reflect the updated field structure:

    • Go to GraphQL → Settings in the staging environment.
    • Click Regenerate Schema.
    • Once regenerated, reload the GraphQL IDE and execute a query to test for data retrieval.

    3. Verify Database Migration Integrity

    Ensure all field data has been correctly transferred to the staging environment:

    • Inspect the wp_options table in the staging database to confirm the existence of relevant ACF options data.
    • If data is missing, compare the development database and manually migrate the missing rows to the staging environment.

    4. Sync ACF Field Groups

    Sometimes field groups need to be explicitly synced to ensure correct functionality:

    • Navigate to Custom Fields → Tools in the staging environment.
    • If any field groups are listed as “Available for Sync,” select and sync them.
    • After syncing, recheck the GraphQL queries.

    If further challenges persist, consider enabling debug mode to capture additional insights into the problem.

    Best Regards,
    Nidhi Makadia

Viewing 1 replies (of 1 total)

The topic ‘GraphQL not return data from options page’ is closed to new replies.