How to use the apollo-graphql/lib/transforms.removeAliases function in apollo-graphql

To help you get started, we’ve selected a few apollo-graphql examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kamilkisiela / graphql-inspector / packages / trace / src / normalize / operation.ts View on Github external
export function normalizeOperation({
  document,
  operationName,
}: {
  document: DocumentNode;
  operationName: string;
}): string {
  return printWithReducedWhitespace(
    sortAST(
      removeAliases(
        hideLiterals(dropUnusedDefinitions(document, operationName)),
      ),
    ),
  );
}