We can add tags to posts in WordPress (i.e. using the taxonomy with name "post_tag"). This is already mapped in the GraphQL schema via the PostTag, associated to a Post entry.
Custom Post Types defined by any theme or plugin (such as "product") can likewise have their own tag taxonomy associated to them (such as "product-tag"). As these tag taxonomies don't ship their own specific type for the GraphQL schema (that would require an extension via PHP code), these are resolved via the GenericTag type.
We use fields tag and tags to fetch tag data, which must indicate which taxonomy they refer to via mandatory field argument taxonomy. The result is of the union type TagUnion, which includes entries from either PostTag or GenericTag (depending on the entry's taxonomy).
Configuring the queryable tag taxonomies permalink
The tag taxonomies that can be queried must be explicitly configured. This can be done in 2 places.
In the Schema Configuration applied to the endpoint, by selecting option "Use custom configuration" under "Customize configuration, or use default from Settings?" and then selecting the desired items:
This list contains all the "non-hierarchical" taxonomies which are associated to queryable custom posts, i.e. those selected in "Included custom post types" in the Settings for "Custom Posts". Each tag taxonomy's associated custom post types is shown under (CPT: ...). If your desired tag taxonomy does not appear here, make sure that all of its associated custom post types are in that allowlist.
Otherwise, if selecting option "Use configuration from Settings", the value defined under section "Included tag taxonomies" in the Settings page for Schema Custom Posts is used: