load("@rules_graphql//graphql/private:graphql_bundle.bzl", "graphql_bundle")
graphql_bundle(name, deps, srcs, aliases, tree_shake)
graphq_bundle merges multiple GraphQL files and/or targets into a single file. It's a critical step for resolving GraphQL imports which are not supported by all runtimes.
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| deps | Dependencies of this target. This may include other graphql_library targets or other targets that provide GraphqlInfo. |
List of labels | optional | [] |
| srcs | Source files, graphql_library targets, graphql_bundle targets, or other targets that provide GraphqlInfo. The generated bundle will include all symbols from files and direct sources of graphql targets. Transitive dependencies are made available for GraphQL imports but are not automatically added to the bundle unless included in the dependency tree starting with the direct sources. |
List of labels | optional | [] |
| aliases | A series of entries which re-map imports to lookup locations. Keys are the aliases used in import statements, values are the paths they resolve to. Uses the same semantics as tsconfig.json#paths. |
Dictionary: String -> String | optional | {} |
| tree_shake | If enabled, any types unreachable from GraphQL's root types (Query, Mutation, and Subscription) will be pruned. | Boolean | optional | False |