import type { GetConnectionOpts } from 'pgsql-test'; import type { SeedAdapter } from 'pgsql-test/seed/types'; import type { GetConnectionsInput, GetConnectionsResult } from './types'; /** * Creates connections with an HTTP server for SuperTest testing * * This is the main entry point for SuperTest-based GraphQL tests. It: * 1. Creates an isolated test database using pgsql-test * 2. Starts a real HTTP server using @constructive-io/graphql-server * 3. Returns a SuperTest agent and query function for making HTTP requests * 4. Provides a teardown function to clean up everything * * @example * ```typescript * const { db, server, query, request, teardown } = await getConnections({ * schemas: ['public', 'app_public'], * authRole: 'anonymous' * }); * * // Use the query function for GraphQL requests * const res = await query(`query { allUsers { nodes { id } } }`); * * // Or use SuperTest directly for more control * const res = await request * .post('/graphql') * .set('Authorization', 'Bearer token') * .send({ query: '{ currentUser { id } }' }); * * // Clean up after tests * await teardown(); * ``` */ export declare const getConnections: (input: GetConnectionsInput & GetConnectionOpts, seedAdapters?: SeedAdapter[]) => Promise;