@constructive-io/graphql-codegen 4.54.0 → 4.55.0

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.
@@ -1,24 +1,12 @@
1
1
  /**
2
2
  * Query-related types for building GraphQL operations
3
+ *
4
+ * The filter, ordering, and pagination grammar is defined by the shared
5
+ * `query-spec` package and re-exported here.
3
6
  */
7
+ import type { Filter, OrderByItem } from 'query-spec';
4
8
  import type { FieldSelection } from './selection';
5
- /**
6
- * Relay-style pagination info
7
- */
8
- export interface PageInfo {
9
- hasNextPage: boolean;
10
- hasPreviousPage: boolean;
11
- startCursor?: string | null;
12
- endCursor?: string | null;
13
- }
14
- /**
15
- * Relay-style connection result
16
- */
17
- export interface ConnectionResult<T = unknown> {
18
- nodes: T[];
19
- totalCount: number;
20
- pageInfo: PageInfo;
21
- }
9
+ export type { ConnectionResult, FieldFilter, Filter, FilterOperator, OrderByItem, OrderDirection, PageInfo, RelationalFilter } from 'query-spec';
22
10
  /**
23
11
  * Options for building SELECT queries
24
12
  */
@@ -51,41 +39,3 @@ export interface QueryOptions {
51
39
  /** Include pageInfo in response */
52
40
  includePageInfo?: boolean;
53
41
  }
54
- /**
55
- * Single order by specification
56
- */
57
- export interface OrderByItem {
58
- field: string;
59
- direction: 'asc' | 'desc';
60
- }
61
- /**
62
- * All supported filter operators
63
- */
64
- export type FilterOperator = 'isNull' | 'equalTo' | 'notEqualTo' | 'distinctFrom' | 'notDistinctFrom' | 'in' | 'notIn' | 'lessThan' | 'lessThanOrEqualTo' | 'greaterThan' | 'greaterThanOrEqualTo' | 'includes' | 'notIncludes' | 'includesInsensitive' | 'notIncludesInsensitive' | 'startsWith' | 'notStartsWith' | 'startsWithInsensitive' | 'notStartsWithInsensitive' | 'endsWith' | 'notEndsWith' | 'endsWithInsensitive' | 'notEndsWithInsensitive' | 'like' | 'notLike' | 'likeInsensitive' | 'notLikeInsensitive' | 'equalToInsensitive' | 'notEqualToInsensitive' | 'distinctFromInsensitive' | 'notDistinctFromInsensitive' | 'inInsensitive' | 'notInInsensitive' | 'contains' | 'containedBy' | 'overlaps' | 'intersects' | 'intersects3D' | 'containsProperly' | 'coveredBy' | 'covers' | 'crosses' | 'disjoint' | 'orderingEquals' | 'touches' | 'within' | 'bboxIntersects2D' | 'bboxIntersects3D' | 'bboxOverlapsOrLeftOf' | 'bboxOverlapsOrRightOf' | 'bboxOverlapsOrBelow' | 'bboxOverlapsOrAbove' | 'bboxLeftOf' | 'bboxRightOf' | 'bboxBelow' | 'bboxAbove' | 'bboxContains' | 'bboxEquals';
65
- /**
66
- * Filter on a single field
67
- */
68
- export type FieldFilter = {
69
- [K in FilterOperator]?: unknown;
70
- };
71
- /**
72
- * Filter on related records
73
- */
74
- export interface RelationalFilter {
75
- /** All related records must match */
76
- every?: Filter;
77
- /** At least one related record must match */
78
- some?: Filter;
79
- /** No related records match */
80
- none?: Filter;
81
- }
82
- /**
83
- * Main filter type - can be nested
84
- */
85
- export type Filter = {
86
- [field: string]: FieldFilter | RelationalFilter | Filter;
87
- } & {
88
- and?: Filter[];
89
- or?: Filter[];
90
- not?: Filter;
91
- };
@@ -1,4 +1,7 @@
1
1
  /**
2
2
  * Query-related types for building GraphQL operations
3
+ *
4
+ * The filter, ordering, and pagination grammar is defined by the shared
5
+ * `query-spec` package and re-exported here.
3
6
  */
4
7
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructive-io/graphql-codegen",
3
- "version": "4.54.0",
3
+ "version": "4.55.0",
4
4
  "description": "GraphQL SDK generator for Constructive databases with React Query hooks",
5
5
  "keywords": [
6
6
  "graphql",
@@ -56,24 +56,25 @@
56
56
  "@0no-co/graphql.web": "^1.1.2",
57
57
  "@babel/generator": "^7.29.1",
58
58
  "@babel/types": "^7.29.0",
59
- "@constructive-io/graphql-query": "^3.34.0",
60
- "@constructive-io/graphql-types": "^3.14.0",
59
+ "@constructive-io/graphql-query": "^3.34.1",
60
+ "@constructive-io/graphql-types": "^3.14.1",
61
61
  "@inquirerer/utils": "^3.3.9",
62
- "@pgpmjs/core": "^6.31.0",
62
+ "@pgpmjs/core": "^6.32.0",
63
63
  "ajv": "^8.20.0",
64
64
  "deepmerge": "^4.3.1",
65
65
  "find-and-require-package-json": "^0.9.1",
66
66
  "gql-ast": "^3.13.0",
67
- "graphile-schema": "^1.29.0",
67
+ "graphile-schema": "^1.29.1",
68
68
  "graphql": "16.13.0",
69
69
  "inflekt": "^0.7.1",
70
70
  "inquirerer": "^4.9.1",
71
71
  "jiti": "^2.7.0",
72
72
  "oxfmt": "^0.51.0",
73
- "pg-cache": "^3.15.0",
73
+ "pg-cache": "^3.15.1",
74
74
  "pg-env": "^1.18.0",
75
- "pgsql-client": "^3.22.0",
76
- "pgsql-seed": "^2.20.0",
75
+ "pgsql-client": "^3.22.1",
76
+ "pgsql-seed": "^2.21.0",
77
+ "query-spec": "^0.1.0",
77
78
  "undici": "^8.3.0"
78
79
  },
79
80
  "peerDependencies": {
@@ -100,5 +101,5 @@
100
101
  "tsx": "^4.21.0",
101
102
  "typescript": "^5.9.3"
102
103
  },
103
- "gitHead": "ff6c442b789cbe8803f33036110f6e09124e65df"
104
+ "gitHead": "0e4acd5d0db04587fb0112b047be6f2c8f2493d9"
104
105
  }
package/types/query.d.ts CHANGED
@@ -1,24 +1,12 @@
1
1
  /**
2
2
  * Query-related types for building GraphQL operations
3
+ *
4
+ * The filter, ordering, and pagination grammar is defined by the shared
5
+ * `query-spec` package and re-exported here.
3
6
  */
7
+ import type { Filter, OrderByItem } from 'query-spec';
4
8
  import type { FieldSelection } from './selection';
5
- /**
6
- * Relay-style pagination info
7
- */
8
- export interface PageInfo {
9
- hasNextPage: boolean;
10
- hasPreviousPage: boolean;
11
- startCursor?: string | null;
12
- endCursor?: string | null;
13
- }
14
- /**
15
- * Relay-style connection result
16
- */
17
- export interface ConnectionResult<T = unknown> {
18
- nodes: T[];
19
- totalCount: number;
20
- pageInfo: PageInfo;
21
- }
9
+ export type { ConnectionResult, FieldFilter, Filter, FilterOperator, OrderByItem, OrderDirection, PageInfo, RelationalFilter } from 'query-spec';
22
10
  /**
23
11
  * Options for building SELECT queries
24
12
  */
@@ -51,41 +39,3 @@ export interface QueryOptions {
51
39
  /** Include pageInfo in response */
52
40
  includePageInfo?: boolean;
53
41
  }
54
- /**
55
- * Single order by specification
56
- */
57
- export interface OrderByItem {
58
- field: string;
59
- direction: 'asc' | 'desc';
60
- }
61
- /**
62
- * All supported filter operators
63
- */
64
- export type FilterOperator = 'isNull' | 'equalTo' | 'notEqualTo' | 'distinctFrom' | 'notDistinctFrom' | 'in' | 'notIn' | 'lessThan' | 'lessThanOrEqualTo' | 'greaterThan' | 'greaterThanOrEqualTo' | 'includes' | 'notIncludes' | 'includesInsensitive' | 'notIncludesInsensitive' | 'startsWith' | 'notStartsWith' | 'startsWithInsensitive' | 'notStartsWithInsensitive' | 'endsWith' | 'notEndsWith' | 'endsWithInsensitive' | 'notEndsWithInsensitive' | 'like' | 'notLike' | 'likeInsensitive' | 'notLikeInsensitive' | 'equalToInsensitive' | 'notEqualToInsensitive' | 'distinctFromInsensitive' | 'notDistinctFromInsensitive' | 'inInsensitive' | 'notInInsensitive' | 'contains' | 'containedBy' | 'overlaps' | 'intersects' | 'intersects3D' | 'containsProperly' | 'coveredBy' | 'covers' | 'crosses' | 'disjoint' | 'orderingEquals' | 'touches' | 'within' | 'bboxIntersects2D' | 'bboxIntersects3D' | 'bboxOverlapsOrLeftOf' | 'bboxOverlapsOrRightOf' | 'bboxOverlapsOrBelow' | 'bboxOverlapsOrAbove' | 'bboxLeftOf' | 'bboxRightOf' | 'bboxBelow' | 'bboxAbove' | 'bboxContains' | 'bboxEquals';
65
- /**
66
- * Filter on a single field
67
- */
68
- export type FieldFilter = {
69
- [K in FilterOperator]?: unknown;
70
- };
71
- /**
72
- * Filter on related records
73
- */
74
- export interface RelationalFilter {
75
- /** All related records must match */
76
- every?: Filter;
77
- /** At least one related record must match */
78
- some?: Filter;
79
- /** No related records match */
80
- none?: Filter;
81
- }
82
- /**
83
- * Main filter type - can be nested
84
- */
85
- export type Filter = {
86
- [field: string]: FieldFilter | RelationalFilter | Filter;
87
- } & {
88
- and?: Filter[];
89
- or?: Filter[];
90
- not?: Filter;
91
- };
package/types/query.js CHANGED
@@ -1,5 +1,8 @@
1
1
  "use strict";
2
2
  /**
3
3
  * Query-related types for building GraphQL operations
4
+ *
5
+ * The filter, ordering, and pagination grammar is defined by the shared
6
+ * `query-spec` package and re-exported here.
4
7
  */
5
8
  Object.defineProperty(exports, "__esModule", { value: true });