(ref: IntrospectionTypeRef)
| 358 | }; |
| 359 | |
| 360 | const formatTypeRef = (ref: IntrospectionTypeRef): string => |
| 361 | Match.value(ref.kind).pipe( |
| 362 | Match.when("NON_NULL", () => (ref.ofType ? `${formatTypeRef(ref.ofType)}!` : "Unknown!")), |
| 363 | Match.when("LIST", () => (ref.ofType ? `[${formatTypeRef(ref.ofType)}]` : "[Unknown]")), |
| 364 | Match.option, |
| 365 | Option.getOrElse(() => ref.name ?? "Unknown"), |
| 366 | ); |
| 367 | |
| 368 | const unwrapTypeName = (ref: IntrospectionTypeRef): string => { |
| 369 | if (ref.name) return ref.name; |
no outgoing calls
no test coverage detected