INNER CODE UNIT · TypeScript

formatField

Escape-Technologies/graphman · src/converters.ts:80

function formatField(field: ObjectField): FormattedField {
  let description = "";
  if (
    field.description &&
    field.description !== "undefined" &&
    field.description !== ""
  ) {
    description = ` # ${field.description?.replace("\n", " ")}`;
  }

  function scalarFormat(field: ObjectField) {
    return `${field.name}${description}\n`;
  }

  function objectFormat(field: ObjectField) {
    return `# ${field.name}${description}\n`;
  }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…