MCPcopy
hub / github.com/gitify-app/gitify / performGraphQLRequestString

Function performGraphQLRequestString

src/renderer/utils/api/request.ts:45–61  ·  view source on GitHub ↗
(
  account: Account,
  query: string,
  variables: Record<string, unknown>,
)

Source from the content-addressed store, hash-verified

43 * @returns Resolves to a typed GitHub GraphQL response.
44 */
45export async function performGraphQLRequestString<TResult>(
46 account: Account,
47 query: string,
48 variables: Record<string, unknown>,
49): Promise<TResult> {
50 const octokit = await createOctokitClient(account, 'graphql');
51
52 try {
53 return await octokit.graphql<TResult>(query, variables || {});
54 } catch (error) {
55 if (error instanceof GraphqlResponseError) {
56 handleGraphQLResponseError<TResult>('performGraphQLRequestString', error);
57 } else {
58 throw error;
59 }
60 }
61}

Callers 2

request.test.tsFile · 0.90

Calls 2

createOctokitClientFunction · 0.90

Tested by

no test coverage detected