wp-graphql

Custom field not saved

感情迁移 提交于 2021-01-29 07:34:45
问题 I try to add a custom user field to the user by using WPGraphQL. Therefore I tried to recreate the example in the official WPGraphQL documentation https://docs.wpgraphql.com/extending/fields/#register-fields-to-the-schema : add_action('graphql_init', function () { $hobbies = [ 'type' => ['list_of' => 'String'], 'description' => __('Custom field for user mutations', 'your-textdomain'), 'resolve' => function ($user) { $hobbies = get_user_meta($user->userId, 'hobbies', true); return !empty(

gatsby-source-graphql + ACF fields not showing up

佐手、 提交于 2021-01-05 10:26:45
问题 I'm wondering why my ACF fields are not showing up in my gatsby app using the gatsby-source-graphql plugin? My ACF fields show up when I use the WP plugin: WP GraphiQL, but not when I run my gatsby app. Can I only import ACF fields using gatsby-source-wordpress??? Everything else seems to show up. I have a custom post type that I'm using no problem, but ACF fields are the issue. Any help would be amazing, Thanks, Spencer They show up in WP backend: But do not show up when Gatsby runs: Here is