"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphQLRequestError = void 0;
exports.configure = configure;
exports.getClient = getClient;
/**
 * ORM client wrapper for React Query hooks
 * @generated by @constructive-io/graphql-codegen
 * DO NOT EDIT - changes will be overwritten
 */
const orm_1 = require("../orm");
var client_1 = require("../orm/client");
Object.defineProperty(exports, "GraphQLRequestError", { enumerable: true, get: function () { return client_1.GraphQLRequestError; } });
let client = null;
/**
 * Configure the ORM client for React Query hooks
 *
 * @example
 * ```ts
 * import { configure } from './generated/hooks';
 *
 * configure({
 *   endpoint: 'https://api.example.com/graphql',
 *   headers: { Authorization: 'Bearer <token>' },
 * });
 * ```
 */
function configure(config) {
    client = (0, orm_1.createClient)(config);
}
/**
 * Get the configured ORM client instance
 * @throws Error if configure() has not been called
 */
function getClient() {
    if (!client) {
        throw new Error('ORM client not configured. Call configure() before using hooks.');
    }
    return client;
}
