graphile-test 2.1.3 → 2.1.4

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.
@@ -89,7 +89,7 @@ export const GraphQLTest = ({ dbname, schemas, authRole = 'authenticated' }) =>
89
89
  }
90
90
  });
91
91
  };
92
- const graphQLQuery = async (...args) => {
92
+ async function graphQLQuery(...args) {
93
93
  if (!ctx)
94
94
  throw new Error('Context is not initialized. Did you run setup()?');
95
95
  let reqOptions = {};
@@ -160,7 +160,8 @@ export const GraphQLTest = ({ dbname, schemas, authRole = 'authenticated' }) =>
160
160
  replacementPgClient.release();
161
161
  }
162
162
  });
163
- };
163
+ }
164
+ ;
164
165
  return {
165
166
  setup,
166
167
  teardown,
@@ -1,3 +1,4 @@
1
+ import { DocumentNode } from 'graphql';
1
2
  export interface GraphQLTestOptions {
2
3
  dbname: string;
3
4
  schemas: string[];
@@ -7,6 +8,13 @@ export declare const GraphQLTest: ({ dbname, schemas, authRole }: GraphQLTestOpt
7
8
  setup: () => Promise<void>;
8
9
  teardown: () => Promise<void>;
9
10
  graphQL: (...args: any[]) => Promise<any>;
10
- graphQLQuery: (...args: any[]) => Promise<any>;
11
+ graphQLQuery: {
12
+ (Query: string | DocumentNode): Promise<any>;
13
+ (Query: string | DocumentNode, commit: boolean): Promise<any>;
14
+ (Query: string | DocumentNode, vars: Record<string, any>): Promise<any>;
15
+ (Query: string | DocumentNode, vars: Record<string, any>, commit: boolean): Promise<any>;
16
+ (reqOptions: Record<string, any>, Query: string | DocumentNode, vars: Record<string, any>): Promise<any>;
17
+ (reqOptions: Record<string, any>, Query: string | DocumentNode, vars: Record<string, any>, commit: boolean): Promise<any>;
18
+ };
11
19
  withContext: <T>(cb: (ctx: typeof ctx) => T) => T;
12
20
  };
package/graphile-test.js CHANGED
@@ -95,7 +95,7 @@ const GraphQLTest = ({ dbname, schemas, authRole = 'authenticated' }) => {
95
95
  }
96
96
  });
97
97
  };
98
- const graphQLQuery = async (...args) => {
98
+ async function graphQLQuery(...args) {
99
99
  if (!ctx)
100
100
  throw new Error('Context is not initialized. Did you run setup()?');
101
101
  let reqOptions = {};
@@ -166,7 +166,8 @@ const GraphQLTest = ({ dbname, schemas, authRole = 'authenticated' }) => {
166
166
  replacementPgClient.release();
167
167
  }
168
168
  });
169
- };
169
+ }
170
+ ;
170
171
  return {
171
172
  setup,
172
173
  teardown,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphile-test",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "author": "Dan Lynch <pyramation@gmail.com>",
5
5
  "description": "PostGraphile Testing",
6
6
  "main": "index.js",
@@ -34,12 +34,12 @@
34
34
  "graphql-tag": "2.12.6"
35
35
  },
36
36
  "dependencies": {
37
- "@launchql/graphile-settings": "^2.1.3",
38
- "@launchql/types": "^2.1.3",
37
+ "@launchql/graphile-settings": "^2.1.4",
38
+ "@launchql/types": "^2.1.4",
39
39
  "graphql": "^15.5.2",
40
40
  "mock-req": "^0.2.0",
41
41
  "pg": "^8.16.0",
42
42
  "postgraphile": "^4.14.1"
43
43
  },
44
- "gitHead": "db4e995140a7443ecd44cfe36849450d20ac6dfa"
44
+ "gitHead": "4dbc5c03940d1a6645bb9e5c0f5423dcda47a068"
45
45
  }