MCPcopy Create free account
hub / github.com/2fd/graphdoc / useIdentifier

Method useIdentifier

lib/utility/html.ts:73–84  ·  view source on GitHub ↗
(type: TypeRef, toUrl: string)

Source from the content-addressed store, hash-verified

71 }
72
73 useIdentifier(type: TypeRef, toUrl: string): string {
74 switch (type.kind) {
75 case LIST:
76 return '[' + this.useIdentifier(type.ofType as TypeRef, toUrl) + ']';
77
78 case NON_NULL:
79 return this.useIdentifier(type.ofType as TypeRef, toUrl) + '!';
80
81 default:
82 return `<a class="support type" href="${toUrl}">${type.name}</a>`;
83 }
84 }
85
86 useIdentifierLength(type: TypeRef, base: number = 0): number {
87 switch (type.kind) {

Callers 6

argumentMethod · 0.80
fieldMethod · 0.80
inputValueMethod · 0.80
objectMethod · 0.80
schemaMethod · 0.80
unionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected