graphile-test
Version:
PostGraphile Testing
78 lines (77 loc) • 3 kB
TypeScript
import type { GetConnectionOpts } from 'pgsql-test';
import type { SeedAdapter } from 'pgsql-test/seed/types';
import type { PgTestClient } from 'pgsql-test/test-client';
import type { GetConnectionsInput, GraphQLQueryFn, GraphQLQueryFnObj, GraphQLQueryUnwrappedFn, GraphQLQueryUnwrappedFnObj, GraphQLTestContext } 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;
gqlContext: GraphQLTestContext;
}>;
/**
* 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;
}>;