@constructive-io/graphql-query 3.6.6 → 3.7.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/esm/introspect/schema-query.js +1 -0
- package/esm/introspect/transform-schema.js +4 -0
- package/introspect/schema-query.d.ts +1 -1
- package/introspect/schema-query.js +1 -0
- package/introspect/transform-schema.js +4 -0
- package/package.json +3 -3
- package/types/introspection.d.ts +2 -0
- package/types/schema.d.ts +2 -0
|
@@ -46,6 +46,10 @@ export function buildTypeRegistry(types) {
|
|
|
46
46
|
// Resolve input fields for INPUT_OBJECT types
|
|
47
47
|
if (type.kind === 'INPUT_OBJECT' && type.inputFields) {
|
|
48
48
|
resolvedType.inputFields = type.inputFields.map((field) => transformInputValueToCleanArgumentShallow(field));
|
|
49
|
+
// Detect @oneOf directive (GraphQL 16+ discriminated union inputs)
|
|
50
|
+
if (type.isOneOf) {
|
|
51
|
+
resolvedType.isOneOf = true;
|
|
52
|
+
}
|
|
49
53
|
}
|
|
50
54
|
}
|
|
51
55
|
return registry;
|
|
@@ -16,5 +16,5 @@ import type { IntrospectionQueryResponse } from '../types/introspection';
|
|
|
16
16
|
* Uses a recursive TypeRef fragment to handle deeply nested type wrappers
|
|
17
17
|
* (e.g., [String!]! = NON_NULL(LIST(NON_NULL(SCALAR))))
|
|
18
18
|
*/
|
|
19
|
-
export declare const SCHEMA_INTROSPECTION_QUERY = "\nquery IntrospectSchema {\n __schema {\n queryType {\n name\n }\n mutationType {\n name\n }\n subscriptionType {\n name\n }\n types {\n kind\n name\n description\n fields(includeDeprecated: true) {\n name\n description\n args {\n name\n description\n type {\n ...TypeRef\n }\n defaultValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields {\n name\n description\n type {\n ...TypeRef\n }\n defaultValue\n }\n interfaces {\n name\n }\n enumValues(includeDeprecated: true) {\n name\n description\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n name\n }\n }\n directives {\n name\n description\n locations\n args {\n name\n description\n type {\n ...TypeRef\n }\n defaultValue\n }\n }\n }\n}\n\nfragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n}\n";
|
|
19
|
+
export declare const SCHEMA_INTROSPECTION_QUERY = "\nquery IntrospectSchema {\n __schema {\n queryType {\n name\n }\n mutationType {\n name\n }\n subscriptionType {\n name\n }\n types {\n kind\n name\n description\n isOneOf\n fields(includeDeprecated: true) {\n name\n description\n args {\n name\n description\n type {\n ...TypeRef\n }\n defaultValue\n }\n type {\n ...TypeRef\n }\n isDeprecated\n deprecationReason\n }\n inputFields {\n name\n description\n type {\n ...TypeRef\n }\n defaultValue\n }\n interfaces {\n name\n }\n enumValues(includeDeprecated: true) {\n name\n description\n isDeprecated\n deprecationReason\n }\n possibleTypes {\n name\n }\n }\n directives {\n name\n description\n locations\n args {\n name\n description\n type {\n ...TypeRef\n }\n defaultValue\n }\n }\n }\n}\n\nfragment TypeRef on __Type {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n ofType {\n kind\n name\n }\n }\n }\n }\n }\n }\n }\n}\n";
|
|
20
20
|
export type { IntrospectionQueryResponse };
|
|
@@ -58,6 +58,10 @@ function buildTypeRegistry(types) {
|
|
|
58
58
|
// Resolve input fields for INPUT_OBJECT types
|
|
59
59
|
if (type.kind === 'INPUT_OBJECT' && type.inputFields) {
|
|
60
60
|
resolvedType.inputFields = type.inputFields.map((field) => transformInputValueToCleanArgumentShallow(field));
|
|
61
|
+
// Detect @oneOf directive (GraphQL 16+ discriminated union inputs)
|
|
62
|
+
if (type.isOneOf) {
|
|
63
|
+
resolvedType.isOneOf = true;
|
|
64
|
+
}
|
|
61
65
|
}
|
|
62
66
|
}
|
|
63
67
|
return registry;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/graphql-query",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "Constructive GraphQL Query",
|
|
5
5
|
"author": "Constructive <developers@constructive.io>",
|
|
6
6
|
"main": "index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"grafast": "1.0.0-rc.9",
|
|
35
35
|
"graphile-build-pg": "5.0.0-rc.8",
|
|
36
36
|
"graphile-config": "1.0.0-rc.6",
|
|
37
|
-
"graphile-settings": "^4.
|
|
37
|
+
"graphile-settings": "^4.11.0",
|
|
38
38
|
"graphql": "16.13.0",
|
|
39
39
|
"inflection": "^3.0.0",
|
|
40
40
|
"inflekt": "^0.3.3",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"makage": "^0.1.10"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "d7ad4d8a95a9ab73c9eee919e0cdfcc2334845af"
|
|
55
55
|
}
|
package/types/introspection.d.ts
CHANGED
package/types/schema.d.ts
CHANGED