graphile-test 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/context.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { ExecutionResult, DocumentNode } from 'graphql';
2
- import { PostGraphileOptions } from 'postgraphile';
1
+ import { DocumentNode, ExecutionResult } from 'graphql';
3
2
  import type { Client, Pool } from 'pg';
4
3
  import { GetConnectionOpts, GetConnectionResult } from 'pgsql-test';
4
+ import { PostGraphileOptions } from 'postgraphile';
5
5
  import { GetConnectionsInput } from './types';
6
6
  export declare const runGraphQLInContext: <T = ExecutionResult>({ input, conn, pgPool, schema, options, authRole, query, variables, reqOptions }: {
7
7
  input: GetConnectionsInput & GetConnectionOpts;
package/context.js CHANGED
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.runGraphQLInContext = void 0;
7
7
  exports.setContextOnClient = setContextOnClient;
8
8
  const graphql_1 = require("graphql");
9
- const postgraphile_1 = require("postgraphile");
10
9
  // @ts-ignore
11
10
  const mock_req_1 = __importDefault(require("mock-req"));
11
+ const postgraphile_1 = require("postgraphile");
12
12
  const runGraphQLInContext = async ({ input, conn, pgPool, schema, options, authRole, query, variables, reqOptions = {} }) => {
13
13
  if (!conn.pg.client) {
14
14
  throw new Error('pgClient is required and must be provided externally.');
package/esm/context.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { graphql, print } from 'graphql';
2
- import { withPostGraphileContext } from 'postgraphile';
3
2
  // @ts-ignore
4
3
  import MockReq from 'mock-req';
4
+ import { withPostGraphileContext } from 'postgraphile';
5
5
  export const runGraphQLInContext = async ({ input, conn, pgPool, schema, options, authRole, query, variables, reqOptions = {} }) => {
6
6
  if (!conn.pg.client) {
7
7
  throw new Error('pgClient is required and must be provided externally.');
@@ -1,6 +1,6 @@
1
- import { runGraphQLInContext } from './context';
2
- import { createPostGraphileSchema } from 'postgraphile';
3
1
  import { getGraphileSettings } from 'graphile-settings';
2
+ import { createPostGraphileSchema } from 'postgraphile';
3
+ import { runGraphQLInContext } from './context';
4
4
  export const GraphQLTest = (input, conn) => {
5
5
  const { schemas, authRole } = input;
6
6
  let schema;
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from './clean';
2
- export * from './graphile-test';
3
2
  export * from './get-connections';
3
+ export * from './graphile-test';
4
4
  export * from './types';
5
5
  export { seed } from 'pgsql-test';
@@ -1,7 +1,7 @@
1
1
  import type { GetConnectionOpts } from 'pgsql-test';
2
- import type { PgTestClient } from 'pgsql-test/test-client';
3
2
  import type { SeedAdapter } from 'pgsql-test/seed/types';
4
- import type { GraphQLQueryFnObj, GraphQLQueryFn, GraphQLQueryUnwrappedFnObj, GraphQLQueryUnwrappedFn, GetConnectionsInput } from './types';
3
+ import type { PgTestClient } from 'pgsql-test/test-client';
4
+ import type { GetConnectionsInput, GraphQLQueryFn, GraphQLQueryFnObj, GraphQLQueryUnwrappedFn, GraphQLQueryUnwrappedFnObj } from './types';
5
5
  /**
6
6
  * Creates connections with raw GraphQL responses
7
7
  */
@@ -1,4 +1,4 @@
1
+ import { GetConnectionOpts, GetConnectionResult } from 'pgsql-test';
1
2
  import type { GraphQLTestContext } from './types';
2
3
  import { GetConnectionsInput } from './types';
3
- import { GetConnectionOpts, GetConnectionResult } from 'pgsql-test';
4
4
  export declare const GraphQLTest: (input: GetConnectionsInput & GetConnectionOpts, conn: GetConnectionResult) => GraphQLTestContext;
package/graphile-test.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GraphQLTest = void 0;
4
- const context_1 = require("./context");
5
- const postgraphile_1 = require("postgraphile");
6
4
  const graphile_settings_1 = require("graphile-settings");
5
+ const postgraphile_1 = require("postgraphile");
6
+ const context_1 = require("./context");
7
7
  const GraphQLTest = (input, conn) => {
8
8
  const { schemas, authRole } = input;
9
9
  let schema;
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from './clean';
2
- export * from './graphile-test';
3
2
  export * from './get-connections';
3
+ export * from './graphile-test';
4
4
  export * from './types';
5
5
  export { seed } from 'pgsql-test';
package/index.js CHANGED
@@ -16,8 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.seed = void 0;
18
18
  __exportStar(require("./clean"), exports);
19
- __exportStar(require("./graphile-test"), exports);
20
19
  __exportStar(require("./get-connections"), exports);
20
+ __exportStar(require("./graphile-test"), exports);
21
21
  __exportStar(require("./types"), exports);
22
22
  var pgsql_test_1 = require("pgsql-test");
23
23
  Object.defineProperty(exports, "seed", { enumerable: true, get: function () { return pgsql_test_1.seed; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphile-test",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "author": "Dan Lynch <pyramation@gmail.com>",
5
5
  "description": "PostGraphile Testing",
6
6
  "main": "index.js",
@@ -34,8 +34,8 @@
34
34
  "graphql-tag": "2.12.6"
35
35
  },
36
36
  "dependencies": {
37
- "@launchql/types": "^2.1.12",
38
- "graphile-settings": "^2.2.0",
37
+ "@launchql/types": "^2.2.0",
38
+ "graphile-settings": "^2.3.0",
39
39
  "graphql": "15.5.2",
40
40
  "mock-req": "^0.2.0",
41
41
  "pg": "^8.16.0",
@@ -51,5 +51,5 @@
51
51
  "launchql",
52
52
  "test"
53
53
  ],
54
- "gitHead": "d3f4befdbf70969bef95d742dbdbe131a064919c"
54
+ "gitHead": "cbf678ed3d22055b7d972468ca7f822b2662e7d0"
55
55
  }