(ref: IntrospectionTypeRef)
| 21 | |
| 22 | /** Unwrap NON_NULL / LIST wrappers to get the leaf type name */ |
| 23 | const unwrapTypeName = (ref: IntrospectionTypeRef): string => { |
| 24 | if (ref.name) return ref.name; |
| 25 | if (ref.ofType) return unwrapTypeName(ref.ofType); |
| 26 | return "Unknown"; |
| 27 | }; |
| 28 | |
| 29 | /** Check if a type ref is non-null (required) */ |
| 30 | const isNonNull = (ref: IntrospectionTypeRef): boolean => ref.kind === "NON_NULL"; |