Problem
Fallow’s module graph does not treat GraphQL #import lines as edges between documents. Fragment and schema files that are only referenced via #import (and not via JS/TS import) are reported as unused files or otherwise disconnected from the graph. Please consider parsing #import (at least relative string paths) so the static graph matches common bundler behavior.
Example: MyStory.graphql
#import "./content.graphql"
#import "./leaf.graphql"
fragment MyStory on Story {
field {
...content
...leaf
}
}
Here ./content.graphql and ./leaf.graphql are required at build time but may never appear in a JS/TS import if only other .graphql files pull them in. These files are then flagged as unused
Proposed solution
No response
Alternatives considered
No response
Problem
Fallow’s module graph does not treat GraphQL #import lines as edges between documents. Fragment and schema files that are only referenced via #import (and not via JS/TS import) are reported as unused files or otherwise disconnected from the graph. Please consider parsing #import (at least relative string paths) so the static graph matches common bundler behavior.
Example:
MyStory.graphqlHere
./content.graphqland./leaf.graphqlare required at build time but may never appear in a JS/TS import if only other.graphqlfiles pull them in. These files are then flagged as unusedProposed solution
No response
Alternatives considered
No response