Skip to content

[V] $lib

const $lib: TypeSpecLibrary<{
"circular-interface": {
default: "An interface cannot implement itself.";
};
"duplicate-union-variant": {
default: CallableMessage<["type"]>;
};
"empty-enum": {
default: CallableMessage<["name"]>;
};
"empty-schema": {
default: "GraphQL schema has no operations. At minimum a Query root type is required.";
};
"empty-union": {
default: "Union has no non-null variants. A GraphQL union must contain at least one member type.";
};
"graphql-builtin-scalar-collision": {
default: CallableMessage<["name", "builtinName"]>;
};
"graphql-operation-kind-duplicate": {
default: CallableMessage<["entityName"]>;
};
"incompatible-interface-property": {
default: CallableMessage<["property", "interface"]>;
};
"invalid-interface": {
default: CallableMessage<["interface"]>;
};
"missing-interface-property": {
default: CallableMessage<["property", "interface"]>;
};
"operation-field-conflict": {
default: CallableMessage<["operation", "conflictType", "model"]>;
};
"operation-field-duplicate": {
default: CallableMessage<["operation", "model"]>;
};
"operation-fields-ignored-on-input": {
default: CallableMessage<["model"]>;
};
"output-file-collision": {
default: CallableMessage<["path"]>;
};
"reserved-name": {
default: CallableMessage<["name"]>;
};
"type-name-collision": {
default: CallableMessage<["name"]>;
};
"type-reference-not-supported": {
default: "Type references cannot be represented in a GraphQL schema.";
};
"unrecognized-union": {
default: "Unrecognized union construction. Union must be named, a return type, a model property, or an alias.";
};
"unsupported-type": {
default: CallableMessage<["type"]>;
};
}, GraphQLEmitterOptions,
| "interface"
| "operationKind"
| "operationFields"
| "compose"
| "interfaceOnly"
| "schema"
| "specifiedBy">;

TypeSpec library registration providing GraphQL diagnostics, state keys, and emitter options.