Skip to content

Commit 88698ea

Browse files
authored
Merge pull request #1023 from constructive-io/devin/1776760093-codegen-test-helper-and-runtime
feat: consolidate codegen test helper + runtime deep path
2 parents 4ed99db + 8b62982 commit 88698ea

17 files changed

Lines changed: 2864 additions & 7596 deletions

File tree

graphql/codegen/src/__tests__/codegen/__snapshots__/client-generator.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ import type {
108108
GraphQLAdapter,
109109
GraphQLError,
110110
QueryResult,
111-
} from '@constructive-io/graphql-types';
111+
} from '@constructive-io/graphql-query/runtime';
112112
113113
export type {
114114
GraphQLAdapter,
115115
GraphQLError,
116116
QueryResult,
117-
} from '@constructive-io/graphql-types';
117+
} from '@constructive-io/graphql-query/runtime';
118118
119119
/**
120120
* Default adapter that uses fetch for HTTP requests.

graphql/codegen/src/core/codegen/templates/orm-client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ import type {
1212
GraphQLAdapter,
1313
GraphQLError,
1414
QueryResult,
15-
} from '@constructive-io/graphql-types';
15+
} from '@constructive-io/graphql-query/runtime';
1616

1717
export type {
1818
GraphQLAdapter,
1919
GraphQLError,
2020
QueryResult,
21-
} from '@constructive-io/graphql-types';
21+
} from '@constructive-io/graphql-query/runtime';
2222

2323
/**
2424
* Default adapter that uses fetch for HTTP requests.

graphql/codegen/src/core/codegen/templates/query-builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Any changes here will affect all generated ORM clients.
99
*/
1010

11-
import { parseType, print } from '@0no-co/graphql.web';
11+
import { parseType, print } from '@constructive-io/graphql-query/runtime';
1212
import * as t from 'gql-ast';
1313
import type {
1414
ArgumentNode,

graphql/orm-test/__tests__/helpers/codegen-helper.ts

Lines changed: 0 additions & 141 deletions
This file was deleted.

graphql/orm-test/__tests__/mega-query.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { join } from 'path';
2020
import { getConnectionsObject, seed } from 'graphile-test';
2121
import type { GraphQLQueryFnObj, GraphQLResponse } from 'graphile-test';
2222
import { ConstructivePreset } from 'graphile-settings';
23-
import { runCodegenAndLoad } from './helpers/codegen-helper';
23+
import { runCodegenAndLoad } from '@constructive-io/graphql-test';
2424
import { GraphileTestAdapter } from './helpers/graphile-adapter';
2525

2626
jest.setTimeout(120000);

graphql/orm-test/__tests__/orm-m2n.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { getConnectionsObject, seed } from 'graphile-test';
1616
import type { GraphQLQueryFnObj } from 'graphile-test';
1717
import type { PgTestClient } from 'pgsql-test';
1818
import { ConstructivePreset } from 'graphile-settings';
19-
import { runCodegenAndLoad } from './helpers/codegen-helper';
19+
import { runCodegenAndLoad } from '@constructive-io/graphql-test';
2020
import { GraphileTestAdapter } from './helpers/graphile-adapter';
2121

2222
jest.setTimeout(120000);

graphql/orm-test/__tests__/postgis-spatial-relations.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { join } from 'path';
1717
import { getConnectionsObject, seed } from 'graphile-test';
1818
import type { GraphQLQueryFnObj } from 'graphile-test';
1919
import { ConstructivePreset } from 'graphile-settings';
20-
import { runCodegenAndLoad } from './helpers/codegen-helper';
20+
import { runCodegenAndLoad } from '@constructive-io/graphql-test';
2121
import { GraphileTestAdapter } from './helpers/graphile-adapter';
2222

2323
jest.setTimeout(120000);

graphql/orm-test/__tests__/postgis-spatial.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import { join } from 'path';
2424
import { getConnectionsObject, seed } from 'graphile-test';
2525
import type { GraphQLQueryFnObj } from 'graphile-test';
2626
import { ConstructivePreset } from 'graphile-settings';
27-
import { runCodegenAndLoad } from './helpers/codegen-helper';
27+
import { runCodegenAndLoad } from '@constructive-io/graphql-test';
2828
import { GraphileTestAdapter } from './helpers/graphile-adapter';
2929

3030
jest.setTimeout(120000);

graphql/orm-test/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@0no-co/graphql.web": "^1.1.2",
1313
"@constructive-io/graphql-codegen": "workspace:^",
1414
"@constructive-io/graphql-query": "workspace:^",
15+
"@constructive-io/graphql-test": "workspace:^",
1516
"@constructive-io/graphql-types": "workspace:^",
1617
"@types/pg": "^8.18.0",
1718
"gql-ast": "workspace:^",

graphql/query/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
"test:watch": "jest --watch"
3030
},
3131
"dependencies": {
32+
"@0no-co/graphql.web": "^1.1.2",
33+
"@constructive-io/graphql-types": "workspace:^",
3234
"ajv": "^8.18.0",
3335
"gql-ast": "workspace:^",
3436
"grafast": "1.0.0",

0 commit comments

Comments
 (0)