Custom post type not adding custom field

[ad_1]

good day. I am new to wpgraphql so I needed expose a custom postype from a plug-in called wallet premium. I have tried to expose the data to wpgraphql even by directly editing the plug-in. I added show_in_rest and also enabled the customtype to add custom field but I can seem to get any data out of the custom post type.

public static function wallet_post_type_args() {

        return apply_filters( 'hrw_wallet_post_type_args' , array(
            'labels'              => array(
                'name'          => esc_html__( 'All Wallet' , HRW_LOCALE ) ,
                'singular_name' => esc_html__( 'All Wallet' , HRW_LOCALE ) ,
                'all_items'     => esc_html__( 'All Wallet' , HRW_LOCALE ) ,
                'menu_name'     => esc_html_x( 'All Wallet' , 'Admin menu name' , HRW_LOCALE ) ,
                'add_new'       => esc_html__( 'Add Wallet' , HRW_LOCALE ) ,
                'add_new_item'  => esc_html__( 'Add New Wallet' , HRW_LOCALE ) ,
                'edit'          => esc_html__( 'Edit' , HRW_LOCALE ) ,
                'edit_item'     => esc_html__( 'Edit Wallet' , HRW_LOCALE ) ,
                'new_item'      => esc_html__( 'New Wallet' , HRW_LOCALE ) ,
                'view'          => esc_html__( 'View Wallet' , HRW_LOCALE ) ,
                'view_item'     => esc_html__( 'View Wallet' , HRW_LOCALE ) ,
                'view_items'    => esc_html__( 'View Wallet' , HRW_LOCALE ) ,
                'search_items'  => esc_html__( 'Search Users' , HRW_LOCALE ) ,
            ) ,
            'description'         => esc_html__( 'Here you can able to see list of Wallet' , HRW_LOCALE ) ,
            'public'              => true ,
            'show_ui'             => true ,
            'capability_type'     => 'post' ,
            'publicly_queryable'  => true ,
            'exclude_from_search' => false ,
            'hierarchical'        => false , // Hierarchical causes memory issues - WP loads all records!
            'show_in_nav_menus'   => true ,
            'show_in_menu'        => 'hrw_wallet' ,
            'menu_icon'           => HRW_PLUGIN_URL . '/assets/images/dash-icon.png' ,
            'supports'            => array('title', 'editor','custom-fields'),
            'show_in_rest' => true,
             'show_in_graphql' => true,
            'graphql_single_name' => 'hrwwallett',
            'graphql_plural_name' => 'hrwwalletts',
            'query_var'           => true ,
            'map_meta_cap'        => true ,
            // 'rewrite'             => false ,
            'capabilities'        => array(
                'create_posts' => 'do_not_allow' ,
            )
                )
                ) ;
    }

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer