printUnion method

String printUnion(
  1. GraphQLUnionType type
)

Implementation

String printUnion(GraphQLUnionType type) {
  final types = type.possibleTypes;
  final possibleTypes = types.isNotEmpty ? ' = ' + types.join(' | ') : '';
  return printDescription(type.description) +
      'union ' +
      printTypeName(type) +
      printDirectives(type) +
      possibleTypes;
}