@pothos/core
Version:
Pothos (formerly GiraphQL) is a plugin based schema builder for creating code-first GraphQL schemas in typescript
18 lines (12 loc) • 437 B
text/typescript
import { outputShapeKey, parentShapeKey, type SchemaTypes } from '../types';
import { BaseTypeRef } from './base';
export class OutputTypeRef<Types extends SchemaTypes, T, P = T> extends BaseTypeRef<Types> {
override kind;
$inferType!: T;
[outputShapeKey]!: T;
[parentShapeKey]!: P;
constructor(kind: 'Enum' | 'Interface' | 'Object' | 'Scalar' | 'Union', name: string) {
super(kind, name);
this.kind = kind;
}
}