Fix description for Post Types and Taxonomies added to the Schema #1204
Labels
effort: low
Around a day or less
good first issue
Issue that doesn't require previous experience with the codebase
impact: med
Minor performance improvements, fix broad user base issues
scope: api
Issues related to access functions, actions, and filters
scope: docs
Updating, correcting, and improving documentation
Currently, when adding a Post Type or Taxonomy to the WPGraphQL Schema, the root field for the single node entry point isn't documented properly. The field documentation says
A object
.It should instead say
A $post_type Object
. Additionally, it should probably include the description of the Post Type as well.This looks like the erroneous line: https://github.com/wp-graphql/wp-graphql/blob/develop/src/Type/Object/RootQuery.php#L431
Instead of
%
it should be%s
. That will make it go fromA object
toA post object
, but we should also consider adding the post type description.Maybe something like:
sprintf( __( 'A %1$s object. %2$s', 'wp-graphql' ), $post_type_object->graphql_single_name, $post_type_object->description ),
The text was updated successfully, but these errors were encountered: