Skip to content

Can I reference a fragment from another file inside a fragment? #6621

@Attaroce

Description

@Attaroce

Question

I'm trying to split my queries.graphql file to peaces and put them into dedicated packages next to the code where I use them.
Here #930 I figured out that I can put fragments into separate file but it sounds like one file for all fragments and does not mention anything about splitting them. I'am receiving an error

Cannot find fragment `brandFields`
----------------------------------------------------
[74]:        brand @include(if: $withBrand) {
[75]:            ...brandFields
[76]:        }
----------------------------------------------------

Here brandFields are extracted to separate file and the file is placed to another directory.
So I'm wondering if It is an issue of my config (missing locations etc.) or it is not possible?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions