@constructive-io/graphql-codegen 3.1.0 → 3.1.1

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/README.md CHANGED
@@ -183,6 +183,8 @@ interface GraphQLSDKConfigTarget {
183
183
  // Generator flags
184
184
  reactQuery?: boolean; // Generate React Query hooks (output: {output}/hooks)
185
185
  orm?: boolean; // Generate ORM client (output: {output}/orm)
186
+ browserCompatible?: boolean; // Generate browser-compatible code (default: true)
187
+ // Set to false for Node.js with localhost DNS fix
186
188
 
187
189
  // Table filtering (for CRUD operations from _meta)
188
190
  tables?: {
@@ -683,6 +685,8 @@ Generator Options:
683
685
  -t, --target <name> Target name in config file
684
686
  -o, --output <dir> Output directory
685
687
  -a, --authorization <token> Authorization header value
688
+ --browser-compatible Generate browser-compatible code (default: true)
689
+ Set to false for Node.js with localhost DNS fix
686
690
  --skip-custom-operations Only generate table CRUD operations
687
691
  --dry-run Preview without writing files
688
692
  --keep-db Keep ephemeral database after generation (pgpm modes)
package/cli/index.js CHANGED
@@ -33,6 +33,8 @@ Generator Options:
33
33
  -o, --output <dir> Output directory
34
34
  -t, --target <name> Target name (for multi-target configs)
35
35
  -a, --authorization <token> Authorization header value
36
+ --browser-compatible Generate browser-compatible code (default: true)
37
+ Set to false for Node.js with localhost DNS fix
36
38
  --dry-run Preview without writing files
37
39
  -v, --verbose Show detailed output
38
40
 
@@ -105,6 +107,7 @@ const commands = async (argv, prompter, _options) => {
105
107
  authorization: answers.authorization,
106
108
  reactQuery: answers.reactQuery,
107
109
  orm: answers.orm,
110
+ browserCompatible: answers.browserCompatible,
108
111
  dryRun: answers.dryRun,
109
112
  verbose: answers.verbose,
110
113
  });
@@ -126,7 +129,7 @@ exports.options = {
126
129
  v: 'verbose',
127
130
  },
128
131
  boolean: [
129
- 'help', 'version', 'verbose', 'dry-run', 'react-query', 'orm', 'keep-db',
132
+ 'help', 'version', 'verbose', 'dry-run', 'react-query', 'orm', 'keep-db', 'browser-compatible',
130
133
  ],
131
134
  string: [
132
135
  'config', 'endpoint', 'schema-file', 'output', 'target', 'authorization',
package/cli/shared.d.ts CHANGED
@@ -21,6 +21,7 @@ export interface CodegenAnswers {
21
21
  apiNames?: string[];
22
22
  reactQuery?: boolean;
23
23
  orm?: boolean;
24
+ browserCompatible?: boolean;
24
25
  authorization?: string;
25
26
  dryRun?: boolean;
26
27
  verbose?: boolean;
package/cli/shared.js CHANGED
@@ -65,6 +65,14 @@ exports.codegenQuestions = [
65
65
  default: false,
66
66
  useDefault: true,
67
67
  },
68
+ {
69
+ name: 'browserCompatible',
70
+ message: 'Generate browser-compatible code?',
71
+ type: 'confirm',
72
+ required: false,
73
+ default: true,
74
+ useDefault: true,
75
+ },
68
76
  {
69
77
  name: 'authorization',
70
78
  message: 'Authorization header value',
package/esm/cli/index.js CHANGED
@@ -30,6 +30,8 @@ Generator Options:
30
30
  -o, --output <dir> Output directory
31
31
  -t, --target <name> Target name (for multi-target configs)
32
32
  -a, --authorization <token> Authorization header value
33
+ --browser-compatible Generate browser-compatible code (default: true)
34
+ Set to false for Node.js with localhost DNS fix
33
35
  --dry-run Preview without writing files
34
36
  -v, --verbose Show detailed output
35
37
 
@@ -102,6 +104,7 @@ export const commands = async (argv, prompter, _options) => {
102
104
  authorization: answers.authorization,
103
105
  reactQuery: answers.reactQuery,
104
106
  orm: answers.orm,
107
+ browserCompatible: answers.browserCompatible,
105
108
  dryRun: answers.dryRun,
106
109
  verbose: answers.verbose,
107
110
  });
@@ -122,7 +125,7 @@ export const options = {
122
125
  v: 'verbose',
123
126
  },
124
127
  boolean: [
125
- 'help', 'version', 'verbose', 'dry-run', 'react-query', 'orm', 'keep-db',
128
+ 'help', 'version', 'verbose', 'dry-run', 'react-query', 'orm', 'keep-db', 'browser-compatible',
126
129
  ],
127
130
  string: [
128
131
  'config', 'endpoint', 'schema-file', 'output', 'target', 'authorization',
@@ -21,6 +21,7 @@ export interface CodegenAnswers {
21
21
  apiNames?: string[];
22
22
  reactQuery?: boolean;
23
23
  orm?: boolean;
24
+ browserCompatible?: boolean;
24
25
  authorization?: string;
25
26
  dryRun?: boolean;
26
27
  verbose?: boolean;
package/esm/cli/shared.js CHANGED
@@ -60,6 +60,14 @@ export const codegenQuestions = [
60
60
  default: false,
61
61
  useDefault: true,
62
62
  },
63
+ {
64
+ name: 'browserCompatible',
65
+ message: 'Generate browser-compatible code?',
66
+ type: 'confirm',
67
+ required: false,
68
+ default: true,
69
+ useDefault: true,
70
+ },
63
71
  {
64
72
  name: 'authorization',
65
73
  message: 'Authorization header value',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructive-io/graphql-codegen",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "GraphQL SDK generator for Constructive databases with React Query hooks",
5
5
  "keywords": [
6
6
  "graphql",
@@ -99,5 +99,5 @@
99
99
  "tsx": "^4.21.0",
100
100
  "typescript": "^5.9.3"
101
101
  },
102
- "gitHead": "feaeaaeb78656bccab7725854fb1cfc4e724ba0a"
102
+ "gitHead": "03cfe7dad85283c7364bc38261136933a20ba73d"
103
103
  }