@platformatic/sql-graphql 3.66.0 → 3.68.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.
- package/lib/entity-to-type.js +7 -0
- package/package.json +6 -6
package/lib/entity-to-type.js
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
GraphQLObjectType,
|
|
12
12
|
GraphQLScalarType
|
|
13
13
|
} from 'graphql'
|
|
14
|
+
import { GraphQLJSONObject } from 'graphql-type-json'
|
|
14
15
|
import { UnableToGenerateGraphQLEnumTypeError } from './errors.js'
|
|
15
16
|
import { fromSelectionSet, sqlTypeToGraphQL } from './utils.js'
|
|
16
17
|
|
|
@@ -100,6 +101,12 @@ export function constructGraph (app, entity, opts, ignore) {
|
|
|
100
101
|
app.log.error({ key, enumValues, entityName, table: entity.table, schema: entity.schema })
|
|
101
102
|
throw new UnableToGenerateGraphQLEnumTypeError()
|
|
102
103
|
}
|
|
104
|
+
} else if (field.isJson) {
|
|
105
|
+
// MariaDB has no native JSON type: JSON columns are introspected as
|
|
106
|
+
// `longtext` (see sql-mapper), so sqlTypeToGraphQL would otherwise
|
|
107
|
+
// fall back to GraphQLString and break serialization of the parsed
|
|
108
|
+
// JSON object returned by the resolver.
|
|
109
|
+
meta.type = GraphQLJSONObject
|
|
103
110
|
} else {
|
|
104
111
|
meta.type = sqlTypeToGraphQL(field.sqlType)
|
|
105
112
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/sql-graphql",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.68.0",
|
|
4
4
|
"description": "Map SQL dbs to GraphQL",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"fastify-tsconfig": "^3.0.0",
|
|
25
25
|
"neostandard": "^0.12.0",
|
|
26
26
|
"tstyche": "^6.2.0",
|
|
27
|
-
"typescript": "
|
|
27
|
+
"typescript": "~6.0.3",
|
|
28
28
|
"why-is-node-running": "^2.2.2",
|
|
29
29
|
"ws": "^8.16.0",
|
|
30
|
-
"@platformatic/sql-
|
|
31
|
-
"@platformatic/sql-
|
|
32
|
-
"@platformatic/telemetry": "3.
|
|
30
|
+
"@platformatic/sql-mapper": "3.68.0",
|
|
31
|
+
"@platformatic/sql-events": "3.68.0",
|
|
32
|
+
"@platformatic/telemetry": "3.68.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@fastify/error": "^4.0.0",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"graphql-type-json": "^0.3.2",
|
|
42
42
|
"inflected": "^2.1.0",
|
|
43
43
|
"mercurius": "^16.0.0",
|
|
44
|
-
"@platformatic/foundation": "3.
|
|
44
|
+
"@platformatic/foundation": "3.68.0"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=22.19.0"
|