wp.data.select('core').getPostTypes() will show return an array of objects that represent each registered post type that is available via the REST API.
wp.apiFetch({path:'wp/v2/posts'}).then( res => console.log( res ) ); will retrieve the latest posts. You may want/need to update the parameters to suit your needs. See the docs for more details
Related Posts:
- Enable Gutenberg on custom post type
- Creating conditional blocks for WordPress Gutenberg
- Add class to Gutenberg Editor for Custom Post Types
- How to filter by custom post type on Gutenberg “Latest Posts’ block
- Gutenberg: Sidebar for specific post type
- Gutenberg how to make attribute to save to meta
- How to add button to post page WordPress 5.x
- WordPress Gutenberg-Block with ESNext (withState, withSelect)
- The editor has encountered an unexpected error. // TypeError: Cannot read property ‘prefix’ of null
- Display different gutenberg template from selected post attributes
- WordPress Rest API only returns content when posttype has editor capability
- Lock post meta block at the bottom of a custom post type
- Gutenberg Featured-Image-panel missing when user with custom role edits Custom Post Type
- Adding a Gutenberg-like custom field on a custom post type
- Classic editor showing in Gutenberg when creating a custom post type
- Creating template with h3 block (block editor)
- How To Enable Block Editor (Gutenberg) for Existing Post Type via functions.php
- How to make a custom taxonomy selectable in post publish area?
- show_in_rest false disable Gutenberg
- I can’t choose the custom taxonomy in my custom post type on Gutenberg
- Parent field missing from custom post type in the block editor
- How to get the parent of a non-hierarchical custom post type being edited in Gutenberg
- post_type_link not working in gutenberg
- What is the recommended / best way to do this: Event calendar post/type in a block-based theme?
- Getting meta in editor plugin, and event triggering issue
- Save the post parent in a custom post type in Gutenberg
- WordPress CPT save metadata in gutenberg
- Can I override a CPT template on a per post basis with Gutenberg block editor?
- Query Post Object in WP Admin
- How to display “Category and Post_tag” component in a CPT Gutenberg edit screen?
- Combine multiple getEntityRecords calls
- Custom post type editor uses old tinyMCE
- Use core block functionality in a custom block gutenberg
- gutenberg message
- How do I assign a block template (.html) to a custom post type?
- Custom post type set default template using block editor
- CPT: Enable Gutenberg, but disable editor field
- Select custom post type do display from page editor
- How add Filter by Tags and by categories to custom post type in Gutenberg block
- Is it possible to add the Gutenberg block editor to a custom taxonomy?
- How to debug failing updates for custom post type?
- Some posts not displaying by taxonomy term
- Can you programme the selected page template to display block patterns automatically?
- Possible to limit internal link search to post types with Gutenberg editor?
- Custom Gutenberg block problem – This block has encountered an error and cannot be previewed
- getEntityRecords/useEntityRecords: How to use CPT metadata?
- Custom Block: Adding “Post Type” dropdown to Sidebar Settings
- Post term block variations not generated for custom taxonomies
- Can’t publish custom type posts that don’t support title and editor, instead they’re saved as draft
- Advanced search form with filters for custom taxonomies and custom fields
- Show Custom Taxonomy Inside Custom Menu
- Why does a custom post type need the ”hierarchical’ args setting?
- WordPress REST Create Post of Custom Type
- Created a custom post type- can’t view it
- Merging two Custom Post Types into one
- remove_action conditionally for Custom Post Type
- Uploaded image not appearing in custom post type
- Custom Post Types – Titles as Taxonomies
- Using pre_get_posts to Filter Posts
- Pagination on Custom Post Type: 404 Error
- Query custom post type in the loop
- Custom Post Types – Change order of menu items
- get the custom post type title/name
- Custom post types as sub menu pages and role capabilities issue
- Query custom post type with ACF Date
- Need help with permalink rewrites for Custom Post Types with hierarchical relationships
- Best method to make posts searchable, sortable and filterable – custom field, tag or category?
- Custom post with more than one custom taxonomy
- Shortcode for CPT post content in a page
- Custom Post type category pages template and loop
- Custom templates for a specific category
- How to automatic update date and time when save custom post type
- get_the_tag_list() returns bad links
- Filter second dropdown (tax) based on first dropdown (cpt)
- Excluding a Custom Post Type with a specific tag using pre_get_posts
- REST filters only firing when I have a param set
- WordPress custom post type and taxonomies
- Conflict in function to allow single post template based on category
- How to display “Trash” in my custom post type?
- Sort custom posts by date and then by taxonomy
- Add a form in every post and save data in post meta
- Plugin Development using classes – Public & Private Callbacks
- Get posts in custom post type categories
- Rest Api not working with Iframe in form data
- Getting Custom Posts with Custom Taxonomy
- How to redirect CPT permalinks from ID to default pretty permalinks?
- Custom Taxonomies in body class with parent slug
- Multiple archives for cpt, taxonomies, terms
- Display custom Taxonomies same as listing Categories
- Show all post of a taxonomy with one specific term not working
- Can you get the themes options page to turn on/off which custom post types are registered?
- Thumbnails for custom post not showing up in query
- custom post types, pre_get_posts, wp_list_categories
- WordPress nested loop not working
- next_posts_link returns same content of 1st page
- Is this the correct way to add post-slug input field?
- Determine category in taxonomy of current custom post type
- Create settings page to enable or disable CPT
- Drawbacks of making the default post-type: post hierarchical [closed]
- Show category only if post type is post_three