From e1c1e2544a8c06517472b43ea4e7bb0f7793f7df Mon Sep 17 00:00:00 2001 From: Cat Chen Date: Sat, 3 Aug 2024 21:56:33 -0700 Subject: [PATCH] Update index.ts --- src/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index 2e3b4ad..2e288e2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,8 +10,8 @@ import { import { graphql } from './__graphql__/gql.js'; import { getOctokit } from './getOctokit.js'; -const LOGIN_QUERY = graphql(` - query ViewLogin { +const queryViewerLogin = graphql(` + query ViewerLogin { viewer { login } @@ -23,9 +23,9 @@ export async function getLogin(githubToken: string): Promise { const { viewer: { login }, } = (await octokit.graphql<{ viewer: { login: string } }>( - LOGIN_QUERY, + queryViewerLogin, {}, - )) as ResultOf; + )) as ResultOf; return login; }