MCPcopy
hub / github.com/ardatan/graphql-tools / getType

Method getType

packages/mock/src/MockStore.ts:649–657  ·  view source on GitHub ↗
(typeName: string)

Source from the content-addressed store, hash-verified

647 }
648
649 private getType(typeName: string) {
650 const type = this.schema.getType(typeName);
651
652 if (!type || !(isObjectType(type) || isInterfaceType(type))) {
653 throw new Error(`${typeName} does not exist on schema or is not an object or interface`);
654 }
655
656 return type;
657 }
658
659 private isKeyField(typeName: string, fieldName: string) {
660 return this.getKeyFieldName(typeName) === fieldName;

Callers 15

getFieldTypeMethod · 0.95
getKeyFieldNameMethod · 0.95
applyExtensionsFunction · 0.80
getTypeSpecifiersFunction · 0.80
getFieldSpecifiersFunction · 0.80
pruneSchemaFunction · 0.80
visitQueueFunction · 0.80
visitFieldValueFunction · 0.80
appendObjectFieldsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected