npm.io
3.0.0 • Published 3 years ago

@apollo/utils.removealiases

Licence
MIT
Version
3.0.0
Deps
0
Size
5 kB
Vulns
0
Weekly
0
Stars
41

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

Keywords