UNPKG

graphile-test

Version:
77 lines (76 loc) 2.94 kB
import type { GetConnectionOpts } from 'pgsql-test'; import type { PgTestClient } from 'pgsql-test/test-client'; import type { SeedAdapter } from 'pgsql-test/seed/types'; import type { GraphQLQueryFnObj, GraphQLQueryFn, GraphQLQueryUnwrappedFnObj, GraphQLQueryUnwrappedFn, GetConnectionsInput } from './types'; /** * Creates connections with raw GraphQL responses */ export declare const getConnectionsObject: (input: GetConnectionsInput & GetConnectionOpts, seedAdapters?: SeedAdapter[]) => Promise<{ pg: PgTestClient; db: PgTestClient; teardown: () => Promise<void>; query: GraphQLQueryFnObj; }>; /** * Creates connections with unwrapped GraphQL responses (throws on errors) */ export declare const getConnectionsObjectUnwrapped: (input: GetConnectionsInput & GetConnectionOpts, seedAdapters?: SeedAdapter[]) => Promise<{ pg: PgTestClient; db: PgTestClient; teardown: () => Promise<void>; query: GraphQLQueryUnwrappedFnObj; }>; /** * Creates connections with logging for GraphQL queries */ export declare const getConnectionsObjectWithLogging: (input: GetConnectionsInput & GetConnectionOpts, seedAdapters?: SeedAdapter[]) => Promise<{ pg: PgTestClient; db: PgTestClient; teardown: () => Promise<void>; query: GraphQLQueryFnObj; }>; /** * Creates connections with timing for GraphQL queries */ export declare const getConnectionsObjectWithTiming: (input: GetConnectionsInput & GetConnectionOpts, seedAdapters?: SeedAdapter[]) => Promise<{ pg: PgTestClient; db: PgTestClient; teardown: () => Promise<void>; query: GraphQLQueryFnObj; }>; /** * Creates connections with raw GraphQL responses (positional API) */ export declare const getConnections: (input: GetConnectionsInput & GetConnectionOpts, seedAdapters?: SeedAdapter[]) => Promise<{ pg: PgTestClient; db: PgTestClient; teardown: () => Promise<void>; query: GraphQLQueryFn; }>; /** * Creates connections with unwrapped GraphQL responses (positional API, throws on errors) */ export declare const getConnectionsUnwrapped: (input: GetConnectionsInput & GetConnectionOpts, seedAdapters?: SeedAdapter[]) => Promise<{ pg: PgTestClient; db: PgTestClient; teardown: () => Promise<void>; query: GraphQLQueryUnwrappedFn; }>; /** * Creates connections with logging for GraphQL queries (positional API) */ export declare const getConnectionsWithLogging: (input: GetConnectionsInput & GetConnectionOpts, seedAdapters?: SeedAdapter[]) => Promise<{ pg: PgTestClient; db: PgTestClient; teardown: () => Promise<void>; query: GraphQLQueryFn; }>; /** * Creates connections with timing for GraphQL queries (positional API) */ export declare const getConnectionsWithTiming: (input: GetConnectionsInput & GetConnectionOpts, seedAdapters?: SeedAdapter[]) => Promise<{ pg: PgTestClient; db: PgTestClient; teardown: () => Promise<void>; query: GraphQLQueryFn; }>;