@constructive-io/graphql-query 3.6.7 → 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.
@@ -31,6 +31,7 @@ query IntrospectSchema {
31
31
  kind
32
32
  name
33
33
  description
34
+ isOneOf
34
35
  fields(includeDeprecated: true) {
35
36
  name
36
37
  description
@@ -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 };
@@ -34,6 +34,7 @@ query IntrospectSchema {
34
34
  kind
35
35
  name
36
36
  description
37
+ isOneOf
37
38
  fields(includeDeprecated: true) {
38
39
  name
39
40
  description
@@ -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.6.7",
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.10.3",
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": "3b3735292589a49601f40645ea7880f584a23b77"
54
+ "gitHead": "d7ad4d8a95a9ab73c9eee919e0cdfcc2334845af"
55
55
  }
@@ -63,6 +63,8 @@ export interface IntrospectionType {
63
63
  interfaces: Array<{
64
64
  name: string;
65
65
  }> | null;
66
+ /** Whether this INPUT_OBJECT type uses @oneOf (GraphQL 16+ discriminated union input) */
67
+ isOneOf?: boolean;
66
68
  }
67
69
  /**
68
70
  * Root type references in schema
package/types/schema.d.ts CHANGED
@@ -262,4 +262,6 @@ export interface ResolvedType {
262
262
  enumValues?: string[];
263
263
  /** Possible types for UNION types */
264
264
  possibleTypes?: string[];
265
+ /** Whether this INPUT_OBJECT uses @oneOf (GraphQL 16+ discriminated union input) */
266
+ isOneOf?: boolean;
265
267
  }