For CPTs which have been mapped to the schema (eg: this plugin provides types Post and Page, to represent CPTs "post" and "page" respectively), we use fields customPost and customPosts.
In this case, the query can be resolved using the corresponding type to that CPT. Because the results can include entities from different types (such as Post and Page), these fields return the CustomPostUnion type.
When fetching results from a union type, we need to specify the fields to retrieve through fragments. These can be evaluated on interface IsCustomPost, which is implemented by all CPT types, or on each individual type, such as Post or Page.
Using GenericCustomPost, we can only request those fields which are common to all CPTs; fetching custom data from some CPT is not supported (such as fetching the price data for a custom CPT "product").
To fetch custom CPT data, instead, we need to map the CPT to the schema (as shown earlier on):
Create a type Product
Attach a price field to it
Fetch it via customPosts (or a new Root.products field)
When querying field genericCustomPosts, we indicate the CPTs via field argument customPostTypes, which receives a list of strings, with the CPT names as defined in WordPress (such as "post", "page", etc).
In the query below, we fetch 5 custom posts with CPT "post":