Skip to content

When including a document node with sub fragments in gql tag include all fragments #125

@kbambridge

Description

@kbambridge

Say I have a fragment A which has two fragments B and C

fragmentA.gql:

#import "fragmentB"
#import "fragmentC"

fragment A {
  ...B
  items {
      ...C
   }
}

which I import like so:

import fragmentA from './fragmentA.gql'

if I use fragment A in query D like so:

export const queryD = gql`
query getSomeAlphabet {
      id
      ...A
}
${fragmentA}`

The document node queryD only has 2 definitions, the getSomeAlphabet query and A but not the definitions for B and C.

Is this a bug, or am I doing something wrong here?

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