@constructive-io/graphql-test 5.10.6 → 5.10.8
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/adapter.d.ts +1 -1
- package/codegen-helper.d.ts +1 -1
- package/codegen-helper.js +2 -2
- package/esm/codegen-helper.js +2 -2
- package/esm/graphile-test.js +1 -1
- package/esm/index.js +1 -4
- package/get-connections.d.ts +1 -1
- package/graphile-test.d.ts +1 -1
- package/graphile-test.js +1 -1
- package/index.d.ts +4 -4
- package/index.js +1 -4
- package/package.json +10 -10
package/adapter.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* allowing the generated ORM client to work with the test infrastructure
|
|
6
6
|
* without needing an HTTP server.
|
|
7
7
|
*/
|
|
8
|
-
import type { GraphQLQueryFn } from 'graphile-test';
|
|
9
8
|
import type { GraphQLAdapter, QueryResult } from '@constructive-io/graphql-types';
|
|
9
|
+
import type { GraphQLQueryFn } from 'graphile-test';
|
|
10
10
|
/**
|
|
11
11
|
* GraphQL adapter that wraps the graphile-test query function.
|
|
12
12
|
* This implements the GraphQLAdapter interface, allowing the SDK
|
package/codegen-helper.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { GraphQLQueryFn, GraphQLQueryFnObj } from 'graphile-test';
|
|
2
1
|
import type { Table } from '@constructive-io/graphql-query';
|
|
2
|
+
import type { GraphQLQueryFn, GraphQLQueryFnObj } from 'graphile-test';
|
|
3
3
|
export interface CodegenResult {
|
|
4
4
|
/** Factory function to create an ORM client from a GraphQLAdapter */
|
|
5
5
|
createClient: (config: any) => Record<string, any>;
|
package/codegen-helper.js
CHANGED
|
@@ -27,11 +27,11 @@ exports.runCodegenAndLoad = runCodegenAndLoad;
|
|
|
27
27
|
* const orm = codegen.createClient({ adapter });
|
|
28
28
|
* const rows = await orm.myTable.findMany({ select: { id: true } }).execute();
|
|
29
29
|
*/
|
|
30
|
+
const orm_1 = require("@constructive-io/graphql-codegen/core/codegen/orm");
|
|
31
|
+
const graphql_query_1 = require("@constructive-io/graphql-query");
|
|
30
32
|
const fs_1 = __importDefault(require("fs"));
|
|
31
33
|
const path_1 = __importDefault(require("path"));
|
|
32
34
|
const typescript_1 = __importDefault(require("typescript"));
|
|
33
|
-
const graphql_query_1 = require("@constructive-io/graphql-query");
|
|
34
|
-
const orm_1 = require("@constructive-io/graphql-codegen/core/codegen/orm");
|
|
35
35
|
/**
|
|
36
36
|
* Run the codegen pipeline against a live graphile-test schema and load the result.
|
|
37
37
|
*
|
package/esm/codegen-helper.js
CHANGED
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
* const orm = codegen.createClient({ adapter });
|
|
22
22
|
* const rows = await orm.myTable.findMany({ select: { id: true } }).execute();
|
|
23
23
|
*/
|
|
24
|
+
import { generateOrm } from '@constructive-io/graphql-codegen/core/codegen/orm';
|
|
25
|
+
import { inferTablesFromIntrospection, SCHEMA_INTROSPECTION_QUERY, transformSchemaToOperations, } from '@constructive-io/graphql-query';
|
|
24
26
|
import fs from 'fs';
|
|
25
27
|
import path from 'path';
|
|
26
28
|
import ts from 'typescript';
|
|
27
|
-
import { SCHEMA_INTROSPECTION_QUERY, inferTablesFromIntrospection, transformSchemaToOperations, } from '@constructive-io/graphql-query';
|
|
28
|
-
import { generateOrm } from '@constructive-io/graphql-codegen/core/codegen/orm';
|
|
29
29
|
/**
|
|
30
30
|
* Run the codegen pipeline against a live graphile-test schema and load the result.
|
|
31
31
|
*
|
package/esm/graphile-test.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConstructivePreset } from 'graphile-settings';
|
|
2
1
|
import { makeSchema } from 'graphile-build';
|
|
2
|
+
import { ConstructivePreset } from 'graphile-settings';
|
|
3
3
|
import { makePgService } from 'graphile-settings';
|
|
4
4
|
import { runGraphQLInContext } from 'graphile-test/context';
|
|
5
5
|
/**
|
package/esm/index.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
// Override with our custom implementations that use graphile-settings
|
|
2
|
-
export { GraphQLTest } from './graphile-test';
|
|
3
2
|
export * from './get-connections';
|
|
3
|
+
export { GraphQLTest } from './graphile-test';
|
|
4
4
|
export { seed, snapshot } from 'pgsql-test';
|
|
5
|
-
// Re-export low-level DB connection utilities for advanced two-phase patterns
|
|
6
|
-
// (e.g. provision first, then build GraphQL schema over dynamic tables).
|
|
7
5
|
export { getConnections as getDbConnections } from 'pgsql-test';
|
|
8
6
|
// Export GraphQL test adapter for SDK integration
|
|
9
7
|
export { GraphQLTestAdapter } from './adapter';
|
|
10
|
-
// Export codegen-at-test-time helper for dynamic table ORM generation
|
|
11
8
|
export { runCodegenAndLoad } from './codegen-helper';
|
package/get-connections.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { GetConnectionsInput, GraphQLQueryFn, GraphQLQueryFnObj, GraphQLQueryUnwrappedFn, GraphQLQueryUnwrappedFnObj } from 'graphile-test';
|
|
1
2
|
import type { GetConnectionOpts } from 'pgsql-test';
|
|
2
3
|
import type { SeedAdapter } from 'pgsql-test/seed/types';
|
|
3
4
|
import type { PgTestClient } from 'pgsql-test/test-client';
|
|
4
|
-
import type { GetConnectionsInput, GraphQLQueryFn, GraphQLQueryFnObj, GraphQLQueryUnwrappedFn, GraphQLQueryUnwrappedFnObj } from 'graphile-test';
|
|
5
5
|
/**
|
|
6
6
|
* Creates connections with raw GraphQL responses
|
|
7
7
|
*/
|
package/graphile-test.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GetConnectionsInput, GraphQLTestContext } from 'graphile-test';
|
|
2
2
|
import type { GetConnectionOpts, GetConnectionResult } from 'pgsql-test';
|
|
3
3
|
/**
|
|
4
4
|
* Creates a GraphQL test context using PostGraphile v5 with ConstructivePreset.
|
package/graphile-test.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GraphQLTest = void 0;
|
|
4
|
-
const graphile_settings_1 = require("graphile-settings");
|
|
5
4
|
const graphile_build_1 = require("graphile-build");
|
|
5
|
+
const graphile_settings_1 = require("graphile-settings");
|
|
6
6
|
const graphile_settings_2 = require("graphile-settings");
|
|
7
7
|
const context_1 = require("graphile-test/context");
|
|
8
8
|
/**
|
package/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { type
|
|
2
|
-
export { GraphQLTest } from './graphile-test';
|
|
1
|
+
export { type GetConnectionsInput, type GraphQLQueryFn, type GraphQLQueryFnObj, type GraphQLQueryOptions, type GraphQLQueryUnwrappedFn, type GraphQLQueryUnwrappedFnObj, type GraphQLResponse, type GraphQLTestContext, } from 'graphile-test';
|
|
3
2
|
export * from './get-connections';
|
|
3
|
+
export { GraphQLTest } from './graphile-test';
|
|
4
4
|
export { seed, snapshot } from 'pgsql-test';
|
|
5
|
+
export type { GetConnectionOpts, GetConnectionResult } from 'pgsql-test';
|
|
5
6
|
export { getConnections as getDbConnections } from 'pgsql-test';
|
|
6
|
-
export type { GetConnectionResult, GetConnectionOpts } from 'pgsql-test';
|
|
7
7
|
export type { PgTestClient } from 'pgsql-test/test-client';
|
|
8
8
|
export { GraphQLTestAdapter } from './adapter';
|
|
9
|
-
export { runCodegenAndLoad } from './codegen-helper';
|
|
10
9
|
export type { CodegenResult } from './codegen-helper';
|
|
10
|
+
export { runCodegenAndLoad } from './codegen-helper';
|
package/index.js
CHANGED
|
@@ -16,19 +16,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.runCodegenAndLoad = exports.GraphQLTestAdapter = exports.getDbConnections = exports.snapshot = exports.seed = exports.GraphQLTest = void 0;
|
|
18
18
|
// Override with our custom implementations that use graphile-settings
|
|
19
|
+
__exportStar(require("./get-connections"), exports);
|
|
19
20
|
var graphile_test_1 = require("./graphile-test");
|
|
20
21
|
Object.defineProperty(exports, "GraphQLTest", { enumerable: true, get: function () { return graphile_test_1.GraphQLTest; } });
|
|
21
|
-
__exportStar(require("./get-connections"), 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; } });
|
|
24
24
|
Object.defineProperty(exports, "snapshot", { enumerable: true, get: function () { return pgsql_test_1.snapshot; } });
|
|
25
|
-
// Re-export low-level DB connection utilities for advanced two-phase patterns
|
|
26
|
-
// (e.g. provision first, then build GraphQL schema over dynamic tables).
|
|
27
25
|
var pgsql_test_2 = require("pgsql-test");
|
|
28
26
|
Object.defineProperty(exports, "getDbConnections", { enumerable: true, get: function () { return pgsql_test_2.getConnections; } });
|
|
29
27
|
// Export GraphQL test adapter for SDK integration
|
|
30
28
|
var adapter_1 = require("./adapter");
|
|
31
29
|
Object.defineProperty(exports, "GraphQLTestAdapter", { enumerable: true, get: function () { return adapter_1.GraphQLTestAdapter; } });
|
|
32
|
-
// Export codegen-at-test-time helper for dynamic table ORM generation
|
|
33
30
|
var codegen_helper_1 = require("./codegen-helper");
|
|
34
31
|
Object.defineProperty(exports, "runCodegenAndLoad", { enumerable: true, get: function () { return codegen_helper_1.runCodegenAndLoad; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/graphql-test",
|
|
3
|
-
"version": "5.10.
|
|
3
|
+
"version": "5.10.8",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "Constructive GraphQL Testing with all plugins loaded",
|
|
6
6
|
"main": "index.js",
|
|
@@ -34,21 +34,21 @@
|
|
|
34
34
|
"makage": "^0.3.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@constructive-io/graphql-codegen": "^5.13.
|
|
38
|
-
"@constructive-io/graphql-env": "^3.28.
|
|
39
|
-
"@constructive-io/graphql-query": "^4.11.
|
|
40
|
-
"@constructive-io/graphql-types": "^3.27.
|
|
41
|
-
"@pgpmjs/types": "^2.49.
|
|
37
|
+
"@constructive-io/graphql-codegen": "^5.13.8",
|
|
38
|
+
"@constructive-io/graphql-env": "^3.28.3",
|
|
39
|
+
"@constructive-io/graphql-query": "^4.11.8",
|
|
40
|
+
"@constructive-io/graphql-types": "^3.27.3",
|
|
41
|
+
"@pgpmjs/types": "^2.49.3",
|
|
42
42
|
"grafast": "1.0.2",
|
|
43
43
|
"graphile-build": "5.0.2",
|
|
44
44
|
"graphile-build-pg": "5.0.2",
|
|
45
45
|
"graphile-config": "1.0.1",
|
|
46
|
-
"graphile-settings": "^6.11.
|
|
47
|
-
"graphile-test": "^5.10.
|
|
46
|
+
"graphile-settings": "^6.11.8",
|
|
47
|
+
"graphile-test": "^5.10.8",
|
|
48
48
|
"graphql": "16.13.0",
|
|
49
49
|
"mock-req": "^0.2.0",
|
|
50
50
|
"pg": "^8.21.0",
|
|
51
|
-
"pgsql-test": "^5.9.
|
|
51
|
+
"pgsql-test": "^5.9.8",
|
|
52
52
|
"postgraphile": "5.0.3",
|
|
53
53
|
"typescript": "^5.0.0"
|
|
54
54
|
},
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"constructive",
|
|
60
60
|
"test"
|
|
61
61
|
],
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "c20b6be96b39bf71c0e2df0f4b51e05deacd006b"
|
|
63
63
|
}
|