MCPcopy
hub / github.com/graphql/graphql-spec / searchUsersByLoginToken

Function searchUsersByLoginToken

scripts/generate-contributor-list.mjs:201–208  ·  view source on GitHub ↗
(token)

Source from the content-addressed store, hash-verified

199 return "";
200}
201async function searchUsersByLoginToken(token) {
202 if (!TOKEN) return "";
203 const q = `query($q:String!){ search(type: USER, query: $q, first: 5) { nodes { ... on User { login name } } } }`;
204 const r = await graphql(q, { q: `${token} in:login type:user` });
205 const items = r?.data?.search?.nodes ?? [];
206 if (items.length === 1) return items[0]?.login || "";
207 return "";
208}
209async function fetchProfileNames(logins) {
210 const out = new Map();
211 const chunkSize = 40;

Callers 1

workerFunction · 0.85

Calls 1

graphqlFunction · 0.85

Tested by

no test coverage detected