import { type SchemaTypes, UnionRef } from '@pothos/core'; import type DataLoader from 'dataloader'; export class LoadableUnionRef< Types extends SchemaTypes, RefShape, Shape, Key, CacheKey, > extends UnionRef { getDataloader; constructor( name: string, getDataloader: (context: Types['Context']) => DataLoader, ) { super(name); this.getDataloader = getDataloader; } }