Skip to content

Commit d572f5e

Browse files
committed
chore: remove all deprecated code, backward-compat aliases, and legacy shims
- Remove Sqitch aliases (writeSqitchFiles, writeSqitchPlan, SqitchRow) - Remove PgTextClientContext typo alias - Remove LegacyGraphileOptions interface and graphile field from GetConnectionsInput - Remove CustomInflectorPlugin/CustomInflectorPreset backward-compat re-exports - Remove deprecated NodeTypeRegistryPreset section from README - Remove deprecated --template-path CLI option handling - Delete codegen/core/query-builder.ts backward-compat re-export shim - Remove IntrospectionSchema backward-compat alias from codegen/core/types.ts - Move naming helper exports to canonical location in generators/index.ts - Remove legacy graphile options from playwright-test server setup - Clean up backward-compat comments throughout codebase - Remove DEPRECATED block from constructive-preset.ts
1 parent ac3d503 commit d572f5e

27 files changed

Lines changed: 16 additions & 121 deletions

File tree

graphile/graphile-postgis/src/plugins/detect-extension.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import type { PgCodec } from '@dataplan/pg';
44
import type { GraphileConfig } from 'graphile-config';
55
import type { PostgisExtensionInfo } from '../types';
66

7-
// Re-export for backward compat — other plugins import from here
87
export type { PostgisExtensionInfo } from '../types';
98

109
/**

graphile/graphile-search/src/codecs/tsvector-codec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* HIDE_BY_DEFAULT). This plugin:
99
*
1010
* 1. Creates codecs for tsvector/tsquery via gather.hooks.pgCodecs_findPgCodec
11-
* (kept for backward compatibility with older versions; rc.8+ handles this
11+
* (rc.8+ handles this
1212
* natively so the hook returns early when event.pgCodec is already set)
1313
* 2. Registers a custom "FullText" scalar type for tsvector columns
1414
* 3. Maps tsvector codec to the FullText scalar (isolating filter operators)

graphile/graphile-settings/src/plugins/custom-inflector.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,3 @@ export const InflektPlugin: GraphileConfig.Plugin = {
478478
export const InflektPreset: GraphileConfig.Preset = {
479479
plugins: [InflektPlugin],
480480
};
481-
482-
// Re-export for backwards compatibility
483-
export const CustomInflectorPlugin = InflektPlugin;
484-
export const CustomInflectorPreset = InflektPreset;

graphile/graphile-settings/src/plugins/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ export { MinimalPreset } from './minimal-preset';
1111
export {
1212
InflektPlugin,
1313
InflektPreset,
14-
CustomInflectorPlugin,
15-
CustomInflectorPreset,
1614
} from './custom-inflector';
1715

1816
// Conflict detector for multi-schema setups

graphile/graphile-settings/src/presets/constructive-preset.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ import { constructiveUploadFieldDefinitions } from '../upload-resolver';
4545
* - pg_trgm fuzzy matching (similarTo/wordSimilarTo on text columns, similarity score fields,
4646
* orderBy similarity — zero config, typo-tolerant)
4747
*
48-
* DEPRECATED:
49-
* - The `condition` argument has been removed. All filtering lives under `filter`.
50-
* PgConditionArgumentPlugin and PgConditionCustomFieldsPlugin are disabled.
51-
*
5248
* RELATION FILTERS:
5349
* - Enabled via connectionFilterRelations: true
5450
* - Forward: filter child by parent (e.g. allOrders(filter: { clientByClientId: { name: { startsWith: "Acme" } } }))

graphile/graphile-test/src/context.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ interface V4Result<TData = unknown> {
8787
* - They may have `locations: undefined` instead of omitting the field
8888
* - They don't always include locations even when nodes are available
8989
*
90-
* This normalizes errors to match v4 format for backward compatibility.
90+
* This normalizes errors to match v4 format.
9191
*
9292
* @param error - The GraphQL error to format
9393
* @param document - The original document (used to derive locations from path)
@@ -153,7 +153,7 @@ function formatErrorToV4(error: GraphQLError, document?: DocumentNode): V4Format
153153

154154
/**
155155
* Normalize an ExecutionResult to match v4 PostGraphile output format.
156-
* This ensures backward compatibility with existing tests and consumers.
156+
* This ensures existing tests and consumers work correctly.
157157
*
158158
* @param result - The execution result from grafast
159159
* @param document - The original document (used to derive locations from path)
@@ -333,7 +333,7 @@ export const runGraphQLInContext = async <T = ExecutionResult>({
333333
}
334334
}
335335

336-
// Normalize the result to match v4 PostGraphile format for backward compatibility
336+
// Normalize the result to match v4 PostGraphile format
337337
return normalizeResult<T>(result, document);
338338
};
339339

graphile/graphile-test/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export type {
1919
GraphQLQueryUnwrappedFnObj,
2020
GraphQLResponse,
2121
GraphQLTestContext,
22-
LegacyGraphileOptions,
2322
Variables,
2423
} from './types';
2524
export { seed, snapshot } from 'pgsql-test';

graphile/graphile-test/src/types.ts

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -25,62 +25,19 @@ export interface GraphQLTestContext {
2525
) => Promise<TResult>;
2626
}
2727

28-
/**
29-
* Legacy v4-style GraphQL options for backward compatibility.
30-
*
31-
* @deprecated Use `preset` instead for v5 configuration.
32-
*/
33-
export interface LegacyGraphileOptions {
34-
/**
35-
* V4-style plugins to append.
36-
* These plugins use the builder.hook() API which is NOT compatible with v5.
37-
* For v5, convert these to proper v5 plugins and use the `preset` option instead.
38-
*
39-
* @deprecated Use preset.plugins for v5 plugins
40-
*/
41-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
42-
appendPlugins?: any[];
43-
/**
44-
* V4-style graphile build options.
45-
*
46-
* @deprecated Use preset.schema for v5 schema options
47-
*/
48-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
49-
graphileBuildOptions?: Record<string, any>;
50-
/**
51-
* V4-style PostGraphile options override.
52-
*
53-
* @deprecated Use preset for v5 configuration
54-
*/
55-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
56-
overrideSettings?: Record<string, any>;
57-
}
58-
5928
/**
6029
* Input for GraphQL test connections.
61-
*
62-
* Supports both v5 preset-based configuration (recommended) and
63-
* legacy v4-style configuration (deprecated, for backward compatibility).
6430
*/
31+
6532
export interface GetConnectionsInput {
6633
useRoot?: boolean;
6734
schemas: string[];
6835
authRole?: string;
6936
/**
70-
* V5 preset configuration (recommended).
37+
* V5 preset configuration.
7138
* Can include extends, plugins, schema options, etc.
7239
*/
7340
preset?: GraphileConfig.Preset;
74-
/**
75-
* Legacy v4-style graphile options for backward compatibility.
76-
*
77-
* NOTE: v4-style plugins (using builder.hook()) are NOT compatible with v5.
78-
* If you use appendPlugins with v4 plugins, they will be ignored.
79-
* Convert your plugins to v5 format and use the `preset` option instead.
80-
*
81-
* @deprecated Use preset for v5 configuration
82-
*/
83-
graphile?: LegacyGraphileOptions;
8441
}
8542

8643
export interface GraphQLResponse<T> {

graphile/node-type-registry/README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,3 @@ Generate SQL seed scripts for `node_type_registry` table:
7373
```bash
7474
cd graphile/node-type-registry && pnpm generate:seed --pgpm ../../constructive-db/packages/metaschema
7575
```
76-
77-
## Preset (deprecated)
78-
79-
> **Note:** The `NodeTypeRegistryPreset` is no longer the recommended approach.
80-
> Use the generated TypeScript types instead (see above). The preset remains
81-
> available for backward compatibility but will be removed in a future version.
82-
83-
```typescript
84-
import { NodeTypeRegistryPreset } from 'node-type-registry/preset';
85-
```

graphql/codegen/src/core/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export * from './ast';
1717
export * from './custom-ast';
1818

1919
// Query builder
20-
export { MetaObject, QueryBuilder } from './query-builder';
20+
export { MetaObject, QueryBuilder } from '@constructive-io/graphql-query';
2121

2222
// Meta object utilities
2323
export { convertFromMetaSchema, validateMetaObject } from './meta-object';

0 commit comments

Comments
 (0)