MCPcopy
hub / github.com/graphql/graphiql / namedKey

Function namedKey

packages/codemirror-graphql/src/variables/mode.ts:107–115  ·  view source on GitHub ↗
(style: string)

Source from the content-addressed store, hash-verified

105
106// A namedKey Token which will decorate the state with a `name`
107function namedKey(style: string) {
108 return {
109 style,
110 match: (token: Token) => token.kind === 'String',
111 update(state: State, token: Token) {
112 state.name = token.value.slice(1, -1); // Remove quotes.
113 },
114 };
115}

Callers 1

mode.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected