Problem/Motivation
I was experimenting with Drupal. In most cases the toolkit was just working, which is super cool. Thanks for the great work!
Now I met the first issue when tried to add content translation support. In Drupal, content translations aren't separate entities, they don't have own IDs, just language codes differ. The idea was to fetch all translations of a Drupal entity into a single Gatsby node. However, in Drupal schema, a content entity and it's translations have the same GraphQL type.
Probably better to explain with screenshots :)
Here is my original fragment:

Both entities and entityTranslations fields have [NodeArticle] type. The toolkit's sees the entityTranslations type and replaces the original fields with a reference. This leads to two things:
entityTranslations field's sub-fields are moved to entities field.
- Content translations are fetched with separate
NODE_ queries. Drupal serve all of them in the default language.

Proposed resolution
Add something like @noReference directive:
fragment NodeArticle on NodeArticle {
entityId
entityTranslations @noReference {
entityLabel
body {
summaryProcessed
processed
}
fieldTags {
entity {
...TaxonomyTermTags
}
}
fieldImage {
entity {
...MediaImage
}
}
}
}
Does this proposal sound good?
Problem/Motivation
I was experimenting with Drupal. In most cases the toolkit was just working, which is super cool. Thanks for the great work!
Now I met the first issue when tried to add content translation support. In Drupal, content translations aren't separate entities, they don't have own IDs, just language codes differ. The idea was to fetch all translations of a Drupal entity into a single Gatsby node. However, in Drupal schema, a content entity and it's translations have the same GraphQL type.
Probably better to explain with screenshots :)
Here is my original fragment:

Both
entitiesandentityTranslationsfields have[NodeArticle]type. The toolkit's sees theentityTranslationstype and replaces the original fields with a reference. This leads to two things:entityTranslationsfield's sub-fields are moved toentitiesfield.NODE_queries. Drupal serve all of them in the default language.Proposed resolution
Add something like
@noReferencedirective:Does this proposal sound good?