diff --git a/plugins/neuf-associations/neuf-associations-post-type.php b/plugins/neuf-associations/neuf-associations-post-type.php index 591a6e91..23e823e5 100644 --- a/plugins/neuf-associations/neuf-associations-post-type.php +++ b/plugins/neuf-associations/neuf-associations-post-type.php @@ -25,6 +25,9 @@ function neuf_associations_post_type() 'show_ui' => true, 'show_in_rest' => true, 'rest_base' => 'associations', + 'show_in_graphql' => true, + 'graphql_single_name' => 'association', + 'graphql_plural_name' => 'associations', 'capability_type' => 'post', 'supports' => array( 'title', diff --git a/plugins/neuf-events/neuf-events-post-types.php b/plugins/neuf-events/neuf-events-post-types.php index 3b1b6f52..667e6a79 100644 --- a/plugins/neuf-events/neuf-events-post-types.php +++ b/plugins/neuf-events/neuf-events-post-types.php @@ -48,6 +48,9 @@ function neuf_events_post_type() 'show_in_rest' => true, 'rest_base' => 'events', 'rest_controller_class' => 'WP_REST_Posts_Controller', + 'show_in_graphql' => true, + 'graphql_single_name' => 'event', + 'graphql_plural_name' => 'events', ) ); } diff --git a/plugins/neuf-events/neuf-events-taxonomies.php b/plugins/neuf-events/neuf-events-taxonomies.php index d8f6ff97..bd43ca44 100644 --- a/plugins/neuf-events/neuf-events-taxonomies.php +++ b/plugins/neuf-events/neuf-events-taxonomies.php @@ -47,6 +47,9 @@ function neuf_events_register_event_type_taxonomy() 'slug' => __('eventtype', 'neuf_event'), 'hierarchical' => true, ), + 'show_in_graphql' => true, + 'graphql_single_name' => 'eventType', + 'graphql_plural_name' => 'eventTypes', ) ); } @@ -85,6 +88,9 @@ function neuf_events_register_organizer_taxonomy() 'rewrite' => array( 'slug' => __('organizer', 'neuf_event'), ), + 'show_in_graphql' => true, + 'graphql_single_name' => 'eventOrganizer', + 'graphql_plural_name' => 'eventOrganizers', ) ); } diff --git a/plugins/neuf-venues/neuf-venues-post-types.php b/plugins/neuf-venues/neuf-venues-post-types.php index e0f1b41d..10c5f5ef 100644 --- a/plugins/neuf-venues/neuf-venues-post-types.php +++ b/plugins/neuf-venues/neuf-venues-post-types.php @@ -48,6 +48,9 @@ function neuf_venues_post_type() ), 'show_in_rest' => true, 'rest_base' => 'venues', + 'show_in_graphql' => true, + 'graphql_single_name' => 'venue', + 'graphql_plural_name' => 'venues', ) ); }