UNPKG

rune

Version:

CLI to upload your games to Rune

20 lines (19 loc) 638 B
import { client } from "../../apollo/client.js"; import { CheckVerificationDocument, } from "../../generated/types.js"; /** * Performs the CheckVerification mutation outside of React context * @param variables The verification token to check * @returns Promise with the auth token if verification was successful */ export async function queryAuthToken(variables) { const { data, errors } = await client.mutate({ mutation: CheckVerificationDocument, variables, }); if (errors && errors.length > 0) { throw errors[0]; } return { authToken: data?.checkVerification.authToken, }; }