MCPcopy Create free account
hub / github.com/openai/plugins / parseField

Method parseField

plugins/shopify/skills/shopify-functions/scripts/validate.mjs:2123–2142  ·  view source on GitHub ↗

* Field : Alias? Name Arguments? Directives? SelectionSet? * * Alias : Name :

()

Source from the content-addressed store, hash-verified

2121 * Alias : Name :
2122 */
2123 parseField() {
2124 const start = this._lexer.token;
2125 const nameOrAlias = this.parseName();
2126 let alias;
2127 let name;
2128 if (this.expectOptionalToken(_tokenKind.TokenKind.COLON)) {
2129 alias = nameOrAlias;
2130 name = this.parseName();
2131 } else {
2132 name = nameOrAlias;
2133 }
2134 return this.node(start, {
2135 kind: _kinds.Kind.FIELD,
2136 alias,
2137 name,
2138 arguments: this.parseArguments(false),
2139 directives: this.parseDirectives(false),
2140 selectionSet: this.peek(_tokenKind.TokenKind.BRACE_L) ? this.parseSelectionSet() : void 0
2141 });
2142 }
2143 /**
2144 * Arguments[Const] : ( Argument[?Const]+ )
2145 */

Callers 1

parseSelectionMethod · 0.45

Calls 7

parseNameMethod · 0.45
expectOptionalTokenMethod · 0.45
nodeMethod · 0.45
parseArgumentsMethod · 0.45
parseDirectivesMethod · 0.45
peekMethod · 0.45
parseSelectionSetMethod · 0.45

Tested by

no test coverage detected