JSPM

@apollo/utils.removealiases

3.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1939685
  • Score
    100M100P100Q192306F
  • License MIT

Remove aliases from a GraphQL document

Package Exports

  • @apollo/utils.removealiases
  • @apollo/utils.removealiases/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@apollo/utils.removealiases) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

removeAliases

The removeAliases function is a graphql-js visitor which removes aliases from all Field nodes. Note that this function makes no guarantees about the output being a valid GraphQL operation.

For example, the following operation is no longer valid once the alias is removed since the fields can't be merged:

query {
  x(a: 1)
  alias: x(a: 2)
}