export type Query | never, Result> = { __data: Result; __variables: Variables; } & string; /** * Imperatively runs a GraphQL query. * * If you import the query from a `.graphql` file, and run `attio dev`, your query variables and * result will be strongly typed. * * @param query The GraphQL query to run. * @param variableValues The values of the variables to pass to the query. * @returns A promise that resolves to the query result. * * @example * * ```graphql * # get-person.graphql * query getPerson($id: String!) { * workspace { * person(id: $id) { * name { * first * last * } * } * } * } * ``` * ```tsx * // get-person-name.ts * import {runQuery} from "attio/client" * import getPersonQuery from "./get-person.graphql.js" * * // ... * * export async function getPersonName(id: string): Promise { * const person = await runQuery(getPersonQuery, {id}) * const firstName: string | null = person.workspace?.person?.name?.first * const lastName: string | null = person.workspace?.person?.name?.last * return `${firstName ?? ""} ${lastName ?? ""}` * } * ``` */ export declare function runQuery, Result>( /** GraphQL query */ query: Query | string, /** GraphQL query variables */ variableValues?: Variables): Promise; //# sourceMappingURL=run-query.d.ts.map