graphile-test 4.7.4 → 4.7.6

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.js CHANGED
@@ -42,7 +42,7 @@ function findFieldNodeByPath(document, path) {
42
42
  * - They may have `locations: undefined` instead of omitting the field
43
43
  * - They don't always include locations even when nodes are available
44
44
  *
45
- * This normalizes errors to match v4 format for backward compatibility.
45
+ * This normalizes errors to match v4 format.
46
46
  *
47
47
  * @param error - The GraphQL error to format
48
48
  * @param document - The original document (used to derive locations from path)
@@ -99,7 +99,7 @@ function formatErrorToV4(error, document) {
99
99
  }
100
100
  /**
101
101
  * Normalize an ExecutionResult to match v4 PostGraphile output format.
102
- * This ensures backward compatibility with existing tests and consumers.
102
+ * This ensures existing tests and consumers work correctly.
103
103
  *
104
104
  * @param result - The execution result from grafast
105
105
  * @param document - The original document (used to derive locations from path)
@@ -228,7 +228,7 @@ const runGraphQLInContext = async ({ input, conn, schema, resolvedPreset, pgServ
228
228
  await pgClient.query(`RELEASE SAVEPOINT ${executionSavepoint}`);
229
229
  }
230
230
  }
231
- // Normalize the result to match v4 PostGraphile format for backward compatibility
231
+ // Normalize the result to match v4 PostGraphile format
232
232
  return normalizeResult(result, document);
233
233
  };
234
234
  exports.runGraphQLInContext = runGraphQLInContext;
package/esm/context.js CHANGED
@@ -38,7 +38,7 @@ function findFieldNodeByPath(document, path) {
38
38
  * - They may have `locations: undefined` instead of omitting the field
39
39
  * - They don't always include locations even when nodes are available
40
40
  *
41
- * This normalizes errors to match v4 format for backward compatibility.
41
+ * This normalizes errors to match v4 format.
42
42
  *
43
43
  * @param error - The GraphQL error to format
44
44
  * @param document - The original document (used to derive locations from path)
@@ -95,7 +95,7 @@ function formatErrorToV4(error, document) {
95
95
  }
96
96
  /**
97
97
  * Normalize an ExecutionResult to match v4 PostGraphile output format.
98
- * This ensures backward compatibility with existing tests and consumers.
98
+ * This ensures existing tests and consumers work correctly.
99
99
  *
100
100
  * @param result - The execution result from grafast
101
101
  * @param document - The original document (used to derive locations from path)
@@ -224,7 +224,7 @@ export const runGraphQLInContext = async ({ input, conn, schema, resolvedPreset,
224
224
  await pgClient.query(`RELEASE SAVEPOINT ${executionSavepoint}`);
225
225
  }
226
226
  }
227
- // Normalize the result to match v4 PostGraphile format for backward compatibility
227
+ // Normalize the result to match v4 PostGraphile format
228
228
  return normalizeResult(result, document);
229
229
  };
230
230
  /**
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { runGraphQLInContext, setContextOnClient } from './context';
2
2
  export { getConnections, getConnectionsObject, getConnectionsObjectUnwrapped, getConnectionsObjectWithLogging, getConnectionsObjectWithTiming, getConnectionsUnwrapped, getConnectionsWithLogging, getConnectionsWithTiming, } from './get-connections';
3
3
  export { GraphQLTest } from './graphile-test';
4
- export type { GetConnectionsInput, GraphQLQueryFn, GraphQLQueryFnObj, GraphQLQueryOptions, GraphQLQueryUnwrappedFn, GraphQLQueryUnwrappedFnObj, GraphQLResponse, GraphQLTestContext, LegacyGraphileOptions, Variables, } from './types';
4
+ export type { GetConnectionsInput, GraphQLQueryFn, GraphQLQueryFnObj, GraphQLQueryOptions, GraphQLQueryUnwrappedFn, GraphQLQueryUnwrappedFnObj, GraphQLResponse, GraphQLTestContext, Variables, } from './types';
5
5
  export { seed, snapshot } from 'pgsql-test';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphile-test",
3
- "version": "4.7.4",
3
+ "version": "4.7.6",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "PostGraphile Testing",
6
6
  "main": "index.js",
@@ -34,9 +34,9 @@
34
34
  "makage": "^0.3.0"
35
35
  },
36
36
  "dependencies": {
37
- "@constructive-io/graphql-env": "^3.5.2",
38
- "@constructive-io/graphql-types": "^3.4.2",
39
- "@pgpmjs/types": "^2.20.2",
37
+ "@constructive-io/graphql-env": "^3.5.3",
38
+ "@constructive-io/graphql-types": "^3.4.3",
39
+ "@pgpmjs/types": "^2.20.3",
40
40
  "grafast": "1.0.0",
41
41
  "graphile-build": "5.0.0",
42
42
  "graphile-build-pg": "5.0.0",
@@ -44,7 +44,7 @@
44
44
  "graphql": "16.13.0",
45
45
  "mock-req": "^0.2.0",
46
46
  "pg": "^8.20.0",
47
- "pgsql-test": "^4.7.4",
47
+ "pgsql-test": "^4.7.6",
48
48
  "postgraphile": "5.0.0"
49
49
  },
50
50
  "keywords": [
@@ -55,5 +55,5 @@
55
55
  "pgpm",
56
56
  "test"
57
57
  ],
58
- "gitHead": "2f6e083d11764a04b2a6bc14df5b2ca2725defc6"
58
+ "gitHead": "0b7edbd088ca9661503c5038134ee15311eac027"
59
59
  }
package/types.d.ts CHANGED
@@ -18,58 +18,18 @@ export interface GraphQLTestContext {
18
18
  teardown: () => Promise<void>;
19
19
  query: <TResult = unknown, TVariables extends Variables = Variables>(opts: GraphQLQueryOptions<TVariables>) => Promise<TResult>;
20
20
  }
21
- /**
22
- * Legacy v4-style GraphQL options for backward compatibility.
23
- *
24
- * @deprecated Use `preset` instead for v5 configuration.
25
- */
26
- export interface LegacyGraphileOptions {
27
- /**
28
- * V4-style plugins to append.
29
- * These plugins use the builder.hook() API which is NOT compatible with v5.
30
- * For v5, convert these to proper v5 plugins and use the `preset` option instead.
31
- *
32
- * @deprecated Use preset.plugins for v5 plugins
33
- */
34
- appendPlugins?: any[];
35
- /**
36
- * V4-style graphile build options.
37
- *
38
- * @deprecated Use preset.schema for v5 schema options
39
- */
40
- graphileBuildOptions?: Record<string, any>;
41
- /**
42
- * V4-style PostGraphile options override.
43
- *
44
- * @deprecated Use preset for v5 configuration
45
- */
46
- overrideSettings?: Record<string, any>;
47
- }
48
21
  /**
49
22
  * Input for GraphQL test connections.
50
- *
51
- * Supports both v5 preset-based configuration (recommended) and
52
- * legacy v4-style configuration (deprecated, for backward compatibility).
53
23
  */
54
24
  export interface GetConnectionsInput {
55
25
  useRoot?: boolean;
56
26
  schemas: string[];
57
27
  authRole?: string;
58
28
  /**
59
- * V5 preset configuration (recommended).
29
+ * V5 preset configuration.
60
30
  * Can include extends, plugins, schema options, etc.
61
31
  */
62
32
  preset?: GraphileConfig.Preset;
63
- /**
64
- * Legacy v4-style graphile options for backward compatibility.
65
- *
66
- * NOTE: v4-style plugins (using builder.hook()) are NOT compatible with v5.
67
- * If you use appendPlugins with v4 plugins, they will be ignored.
68
- * Convert your plugins to v5 format and use the `preset` option instead.
69
- *
70
- * @deprecated Use preset for v5 configuration
71
- */
72
- graphile?: LegacyGraphileOptions;
73
33
  }
74
34
  export interface GraphQLResponse<T> {
75
35
  data?: T;