@constructive-io/graphql-codegen 5.12.6 → 5.12.9
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.
|
@@ -149,6 +149,16 @@ export interface OrmClientConfig {
|
|
|
149
149
|
realtime?: RealtimeConfig;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
/**
|
|
153
|
+
* Describe a single GraphQL error, falling back to its `extensions.code` when
|
|
154
|
+
* the server omits `message` so the error never renders as an empty string.
|
|
155
|
+
*/
|
|
156
|
+
function describeGraphQLError(error: GraphQLError): string {
|
|
157
|
+
if (error.message) return error.message;
|
|
158
|
+
const code = error.extensions?.code;
|
|
159
|
+
return typeof code === 'string' ? code : 'Unknown error';
|
|
160
|
+
}
|
|
161
|
+
|
|
152
162
|
/**
|
|
153
163
|
* Error thrown when GraphQL request fails
|
|
154
164
|
*/
|
|
@@ -157,7 +167,7 @@ export class GraphQLRequestError extends Error {
|
|
|
157
167
|
public readonly errors: GraphQLError[],
|
|
158
168
|
public readonly data: unknown = null,
|
|
159
169
|
) {
|
|
160
|
-
const messages = errors.map(
|
|
170
|
+
const messages = errors.map(describeGraphQLError).join('; ');
|
|
161
171
|
super(`GraphQL Error: ${messages}`);
|
|
162
172
|
this.name = 'GraphQLRequestError';
|
|
163
173
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/graphql-codegen",
|
|
3
|
-
"version": "5.12.
|
|
3
|
+
"version": "5.12.9",
|
|
4
4
|
"description": "GraphQL SDK generator for Constructive databases with React Query hooks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"graphql",
|
|
@@ -56,24 +56,24 @@
|
|
|
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": "^4.10.
|
|
60
|
-
"@constructive-io/graphql-types": "^3.26.
|
|
59
|
+
"@constructive-io/graphql-query": "^4.10.9",
|
|
60
|
+
"@constructive-io/graphql-types": "^3.26.5",
|
|
61
61
|
"@inquirerer/utils": "^3.3.9",
|
|
62
|
-
"@pgpmjs/core": "^7.
|
|
62
|
+
"@pgpmjs/core": "^7.19.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.21.1",
|
|
67
|
-
"graphile-schema": "^2.9.
|
|
67
|
+
"graphile-schema": "^2.9.9",
|
|
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.23.
|
|
73
|
+
"pg-cache": "^3.23.5",
|
|
74
74
|
"pg-env": "^1.26.1",
|
|
75
|
-
"pgsql-client": "^4.8.
|
|
76
|
-
"pgsql-seed": "^3.8.
|
|
75
|
+
"pgsql-client": "^4.8.9",
|
|
76
|
+
"pgsql-seed": "^3.8.9",
|
|
77
77
|
"query-spec": "^0.9.1",
|
|
78
78
|
"undici": "^8.3.0"
|
|
79
79
|
},
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"tsx": "^4.21.0",
|
|
102
102
|
"typescript": "^5.9.3"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "947334d361e9f4c48d451f1c7312b2d705ea154e"
|
|
105
105
|
}
|