printEnum method

String printEnum(
  1. GraphQLEnumType type
)

Implementation

String printEnum(GraphQLEnumType type) {
  final values = type.values.mapIndexed(
    (i, value) =>
        printDescription(value.description, '  ', i == 0) +
        '  ' +
        value.name +
        printDirectives(value),
  );

  return printDescription(type.description) +
      'enum ${printTypeName(type)}${printDirectives(type)}' +
      printBlock(values);
}