1.0.1 • Published 1 year ago

recursive-graphql-fragments v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Recursive GraphQL Fragments

Usage

This library transforms any fragment spreads with @recursive(depth: X) into a set of expanded fragments.

Transforming this:

fragment NestingDollFields on NestingDoll {
  name
  nestingDoll {
    ...NestingDollFields
  }
}

query GetNestedDolls {
  nestingDoll {
    ...NestingDollFields @recursive(depth: 3)
  }
}

Into this:

query GetNestedDolls {
  name
  nestingDoll {
    name
    nestingDoll {
      name
    }
  }
}
1.0.1

1 year ago

1.0.0

1 year ago