• Resolved Nov4tO

    (@nov4to)


    Hello!

    I’m fallowing a tutorial (this tutorial). and im trying to display this custom settings on graphQL API. Im adding the arg ‘show_in_graphql’ => true to register_settings functions but nothing is happening. Im missing something?

    register_setting(“soraSettings”, “twitter_url”, $args);
    register_setting(“soraSettings”, “facebook_url”, $args);
    register_setting(“soraSettings”, “theme_layout”, $args);

    inside args I have my configs and show_in_graphql

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Jason Bahl

    (@jasonbahl)

    @nov4to Thanks for using WPGraphQL!

    To use WordPress settings with GraphQL, you need to register them to show_in_graphql.

    You can see examples here: https://www.wpgraphql.com/docs/settings/.

    One thing to note as well, is that when registering settings, if you only register them within is_admin() context, the settings will not be registered to show in graphql because GraphQL is not within is_admin() context.

Viewing 1 replies (of 1 total)

The topic ‘Registering Custom Settings do not appear’ is closed to new replies.