import type { GitHubGraphqlOptions } from "./types"
export { graphql } from "./core"
import { graphql } from "./core"
/**
* Make one GitHub GraphQL request.
*
* @returns GraphQL response with `data`, optional `errors`, and rate-limit headers.
* @example
* import githubGraphql from 'kody:@kentcdodds/github/graphql'
* const result = await githubGraphql({ account: 'bot', query: 'query { viewer { login } }' })
* // => { data: { viewer: { login: 'kody-bot' } }, ok: true }
*/
export default async function githubGraphql(params: GitHubGraphqlOptions = { query: "query Viewer { viewer { login } }" }) {
return await graphql(params)
}