@apollo/utils.removealiases
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

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)
}

Package Sidebar

Install

npm i @apollo/utils.removealiases

Weekly Downloads

1,501,634

Version

3.0.0

License

MIT

Unpacked Size

4.95 kB

Total Files

10

Last publish

Collaborators

  • dkuc
  • glasser
  • trevor.scheer
  • apollo-bot