包详细信息

@apollo/utils.printwithreducedwhitespace

apollographql7.8mMIT3.0.0

Print an AST with as little whitespace as possible

apollo, graphql, typescript, node

自述文件

printWithReducedWhitespace

Prints a GraphQL AST with a minimal amount of whitespace. Consider using the stripIgnoredCharacters function from graphql instead of this function.

Usage

import { printWithReducedWhitespace } from "@apollo/utils.operationregistrysignature";

const signature = operationRegistrySignature(
  parse(`#graphql
    query Foo {
      bar
    }
  `),
  "Foo",
  { preserveStringAndNumericLiterals: true },
);