INNER CODE UNIT · TypeScript

othersFormat

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

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

  let formattedFieldStr = "";
  if (field.typeBaseKind === "SCALAR" || field.typeBaseKind === "ENUM") {
    formattedFieldStr = scalarFormat(field);
  } else if (
    field.typeBaseKind === "OBJECT" || field.typeBaseKind === "INTERFACE"
  ) {
    formattedFieldStr = objectFormat(field);
  } else {
    formattedFieldStr = othersFormat(field);
  }

  const formattedField: FormattedField = {
    formatedField: formattedFieldStr,
    tempField: `_${crypto.randomUUID().split("-")[0]}\n`,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…