stepzen 0.29.0 → 0.30.0-beta.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.
Files changed (141) hide show
  1. package/README.md +484 -79
  2. package/lib/commands/deploy.d.ts.map +1 -1
  3. package/lib/commands/deploy.js +4 -2
  4. package/lib/commands/deploy.js.map +1 -1
  5. package/lib/commands/import/curl.d.ts +48 -0
  6. package/lib/commands/import/curl.d.ts.map +1 -0
  7. package/lib/commands/import/curl.js +246 -0
  8. package/lib/commands/import/curl.js.map +1 -0
  9. package/lib/commands/import/graphql.d.ts +34 -0
  10. package/lib/commands/import/graphql.d.ts.map +1 -0
  11. package/lib/commands/import/graphql.js +118 -0
  12. package/lib/commands/import/graphql.js.map +1 -0
  13. package/lib/commands/import/index.d.ts +22 -0
  14. package/lib/commands/import/index.d.ts.map +1 -0
  15. package/lib/commands/import/index.js +165 -0
  16. package/lib/commands/import/index.js.map +1 -0
  17. package/lib/commands/import/mysql.d.ts +48 -0
  18. package/lib/commands/import/mysql.d.ts.map +1 -0
  19. package/lib/commands/import/mysql.js +145 -0
  20. package/lib/commands/import/mysql.js.map +1 -0
  21. package/lib/commands/import/postgresql.d.ts +51 -0
  22. package/lib/commands/import/postgresql.d.ts.map +1 -0
  23. package/lib/commands/import/postgresql.js +150 -0
  24. package/lib/commands/import/postgresql.js.map +1 -0
  25. package/lib/commands/import/presto.d.ts +49 -0
  26. package/lib/commands/import/presto.d.ts.map +1 -0
  27. package/lib/commands/import/presto.js +152 -0
  28. package/lib/commands/import/presto.js.map +1 -0
  29. package/lib/commands/import/snowflake.d.ts +53 -0
  30. package/lib/commands/import/snowflake.d.ts.map +1 -0
  31. package/lib/commands/import/snowflake.js +181 -0
  32. package/lib/commands/import/snowflake.js.map +1 -0
  33. package/lib/commands/init.d.ts.map +1 -1
  34. package/lib/commands/init.js +8 -2
  35. package/lib/commands/init.js.map +1 -1
  36. package/lib/commands/list.d.ts.map +1 -1
  37. package/lib/commands/list.js +4 -5
  38. package/lib/commands/list.js.map +1 -1
  39. package/lib/commands/request.d.ts.map +1 -1
  40. package/lib/commands/request.js +10 -8
  41. package/lib/commands/request.js.map +1 -1
  42. package/lib/commands/service.d.ts +1 -1
  43. package/lib/commands/service.d.ts.map +1 -1
  44. package/lib/commands/service.js +30 -23
  45. package/lib/commands/service.js.map +1 -1
  46. package/lib/commands/start.d.ts.map +1 -1
  47. package/lib/commands/start.js +4 -1
  48. package/lib/commands/start.js.map +1 -1
  49. package/lib/commands/upload.d.ts.map +1 -1
  50. package/lib/commands/upload.js +3 -1
  51. package/lib/commands/upload.js.map +1 -1
  52. package/lib/generate/curl2sdl.d.ts +13 -25
  53. package/lib/generate/curl2sdl.d.ts.map +1 -1
  54. package/lib/generate/curl2sdl.js +52 -114
  55. package/lib/generate/curl2sdl.js.map +1 -1
  56. package/lib/generate/flags.d.ts +19 -0
  57. package/lib/generate/flags.d.ts.map +1 -0
  58. package/lib/generate/flags.js +74 -0
  59. package/lib/generate/flags.js.map +1 -0
  60. package/lib/generate/graphql2sdl.d.ts +5 -16
  61. package/lib/generate/graphql2sdl.d.ts.map +1 -1
  62. package/lib/generate/graphql2sdl.js +4 -49
  63. package/lib/generate/graphql2sdl.js.map +1 -1
  64. package/lib/generate/helpers.d.ts +5 -9
  65. package/lib/generate/helpers.d.ts.map +1 -1
  66. package/lib/generate/helpers.js +30 -37
  67. package/lib/generate/helpers.js.map +1 -1
  68. package/lib/generate/import-command.d.ts +25 -0
  69. package/lib/generate/import-command.d.ts.map +1 -0
  70. package/lib/generate/import-command.js +179 -0
  71. package/lib/generate/import-command.js.map +1 -0
  72. package/lib/generate/questions.d.ts +30 -0
  73. package/lib/generate/questions.d.ts.map +1 -0
  74. package/lib/generate/questions.js +50 -0
  75. package/lib/generate/questions.js.map +1 -0
  76. package/lib/generate/sql2sdl.d.ts +14 -18
  77. package/lib/generate/sql2sdl.d.ts.map +1 -1
  78. package/lib/generate/sql2sdl.js +29 -92
  79. package/lib/generate/sql2sdl.js.map +1 -1
  80. package/lib/hooks/prerun/check-upgrade.js +4 -4
  81. package/lib/hooks/prerun/check-upgrade.js.map +1 -1
  82. package/lib/shared/constants.d.ts +3 -2
  83. package/lib/shared/constants.d.ts.map +1 -1
  84. package/lib/shared/constants.js +4 -3
  85. package/lib/shared/constants.js.map +1 -1
  86. package/lib/shared/curl-parser.d.ts +3 -3
  87. package/lib/shared/curl-parser.d.ts.map +1 -1
  88. package/lib/shared/curl-parser.js +52 -39
  89. package/lib/shared/curl-parser.js.map +1 -1
  90. package/lib/shared/docker.d.ts +8 -36
  91. package/lib/shared/docker.d.ts.map +1 -1
  92. package/lib/shared/docker.js +44 -42
  93. package/lib/shared/docker.js.map +1 -1
  94. package/lib/shared/dsn-parser.d.ts +3 -0
  95. package/lib/shared/dsn-parser.d.ts.map +1 -0
  96. package/lib/shared/dsn-parser.js +28 -0
  97. package/lib/shared/dsn-parser.js.map +1 -0
  98. package/lib/shared/header-params-parser.d.ts +7 -5
  99. package/lib/shared/header-params-parser.d.ts.map +1 -1
  100. package/lib/shared/header-params-parser.js +55 -43
  101. package/lib/shared/header-params-parser.js.map +1 -1
  102. package/lib/shared/header.d.ts +2 -2
  103. package/lib/shared/header.d.ts.map +1 -1
  104. package/lib/shared/header.js +13 -7
  105. package/lib/shared/header.js.map +1 -1
  106. package/lib/shared/inquirer.d.ts +2 -0
  107. package/lib/shared/inquirer.d.ts.map +1 -1
  108. package/lib/shared/inquirer.js +12 -4
  109. package/lib/shared/inquirer.js.map +1 -1
  110. package/lib/shared/path-params-parser.d.ts +2 -2
  111. package/lib/shared/path-params-parser.d.ts.map +1 -1
  112. package/lib/shared/path-params-parser.js +11 -7
  113. package/lib/shared/path-params-parser.js.map +1 -1
  114. package/lib/shared/request-variables-parser.d.ts +2 -9
  115. package/lib/shared/request-variables-parser.d.ts.map +1 -1
  116. package/lib/shared/request-variables-parser.js +8 -8
  117. package/lib/shared/request-variables-parser.js.map +1 -1
  118. package/lib/shared/types.d.ts +33 -6
  119. package/lib/shared/types.d.ts.map +1 -1
  120. package/lib/shared/utils.d.ts +13 -13
  121. package/lib/shared/utils.d.ts.map +1 -1
  122. package/lib/shared/utils.js +27 -1
  123. package/lib/shared/utils.js.map +1 -1
  124. package/lib/shared/workspace.d.ts +1 -0
  125. package/lib/shared/workspace.d.ts.map +1 -1
  126. package/lib/shared/workspace.js +5 -0
  127. package/lib/shared/workspace.js.map +1 -1
  128. package/lib/shared/zen-command.d.ts +4 -2
  129. package/lib/shared/zen-command.d.ts.map +1 -1
  130. package/lib/shared/zen-command.js +13 -5
  131. package/lib/shared/zen-command.js.map +1 -1
  132. package/oclif.manifest.json +679 -212
  133. package/package.json +6 -6
  134. package/lib/commands/import.d.ts +0 -85
  135. package/lib/commands/import.d.ts.map +0 -1
  136. package/lib/commands/import.js +0 -645
  137. package/lib/commands/import.js.map +0 -1
  138. package/lib/generate/index.d.ts +0 -6
  139. package/lib/generate/index.d.ts.map +0 -1
  140. package/lib/generate/index.js +0 -4
  141. package/lib/generate/index.js.map +0 -1
package/README.md CHANGED
@@ -30,7 +30,7 @@ $ npm install -g stepzen
30
30
  $ stepzen COMMAND
31
31
  running command...
32
32
  $ stepzen (--version|-v)
33
- stepzen/0.29.0 linux-x64 node-v18.14.0
33
+ stepzen/0.30.0-beta.1 linux-x64 node-v18.15.0
34
34
  $ stepzen --help [COMMAND]
35
35
  USAGE
36
36
  $ stepzen COMMAND
@@ -51,7 +51,14 @@ To run from code: `path-to-repo/bin/run start` (start or whatever command you're
51
51
 
52
52
  $ stepzen deploy ENDPOINT --schema=schema [--configurationsets=cs1[,cs2[,..]]]`](#stepzen-deploy-endpoint---configpathtoconfigyaml---dirpathtoworkspace---or-deprecated----stepzen-deploy-endpoint---schemaschema---configurationsetscs1cs2)
53
53
  * [`stepzen help [COMMANDS]`](#stepzen-help-commands)
54
- * [`stepzen import curl [[CURLOPTS] URL] [--prefix=PREFIX] [--data=DATA] [--request=REQUEST] [--url=URL] [--header=HEADER] [--header-param=HEADER-PARAM] [--query-name=QUERY-NAME] [--query-type=QUERY-TYPE] [--path-params=PATH-PARAMS]`](#stepzen-import-curl-curlopts-url---prefixprefix---datadata---requestrequest---urlurl---headerheader---header-paramheader-param---query-namequery-name---query-typequery-type---path-paramspath-params)
54
+ * [`stepzen import [SOURCE]`](#stepzen-import-source)
55
+ * [`stepzen import curl`](#stepzen-import-curl)
56
+ * [`stepzen import graphql [URL]`](#stepzen-import-graphql-url)
57
+ * [`stepzen import mysql [DSN]`](#stepzen-import-mysql-dsn)
58
+ * [`stepzen import postgres [DSN]`](#stepzen-import-postgres-dsn)
59
+ * [`stepzen import postgresql [DSN]`](#stepzen-import-postgresql-dsn)
60
+ * [`stepzen import singlestore [DSN]`](#stepzen-import-singlestore-dsn)
61
+ * [`stepzen import snowflake [DSN]`](#stepzen-import-snowflake-dsn)
55
62
  * [`stepzen init`](#stepzen-init)
56
63
  * [`stepzen list [TYPE]`](#stepzen-list-type)
57
64
  * [`stepzen login`](#stepzen-login)
@@ -104,6 +111,9 @@ FLAGS
104
111
  --dir=<value>
105
112
  Working directory
106
113
 
114
+ --non-interactive
115
+ Disable all interactive prompts
116
+
107
117
  --schema=<value>
108
118
  Name of a schema uploaded earlier with stepzen upload
109
119
  [DEPRECATED: this flag will be removed in future versions]
@@ -140,33 +150,39 @@ DESCRIPTION
140
150
 
141
151
  _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.4/src/commands/help.ts)_
142
152
 
143
- ## `stepzen import curl [[CURLOPTS] URL] [--prefix=PREFIX] [--data=DATA] [--request=REQUEST] [--url=URL] [--header=HEADER] [--header-param=HEADER-PARAM] [--query-name=QUERY-NAME] [--query-type=QUERY-TYPE] [--path-params=PATH-PARAMS]`
153
+ ## `stepzen import [SOURCE]`
144
154
 
145
- Import a schema for an external data source or an API endpoint to your GraphQL API.
155
+ Import a schema for an external data source or an API endpoint into your GraphQL API.
146
156
 
147
157
  ```
148
158
  USAGE
149
- $ stepzen import curl [[CURLOPTS] URL] [--prefix=PREFIX] [--data=DATA] [--request=REQUEST] [--url=URL]
150
- [--header=HEADER] [--header-param=HEADER-PARAM] [--query-name=QUERY-NAME] [--query-type=QUERY-TYPE]
151
- [--path-params=PATH-PARAMS]
152
- $ stepzen import graphql [URL] [--prefix=PREFIX] [--header=HEADER] [--header-param=HEADER-PARAM]
153
- $ stepzen import mysql [--db-host=DB-HOST] [--db-user=DB-USER] [--db-password=DB-PASSWORD]
154
- [--db-database=DB-DATABASE] [--db-link-types] [--db-include=DB-INCLUDE]
155
- $ stepzen import mysql://[USER:PASSWORD@]HOST[:PORT][/DATABASE] [--db-link-types] [--db-include=DB-INCLUDE]
156
- $ stepzen import postgresql [--db-host=DB-HOST] [--db-user=DB-USER] [--db-password=DB-PASSWORD]
157
- [--db-database=DB-DATABASE] [--db-link-types] [--db-include=DB-INCLUDE] [--db-schema=DB-SCHEMA]
158
- $ stepzen import postgresql://[USER:PASSWORD@]HOST[:PORT][/DATABASE] [--db-link-types] [--db-include=DB-INCLUDE]
159
- [--db-schema=DB-SCHEMA]
160
- $ stepzen import snowflake [--db-user=DB-USER] [--db-password=DB-PASSWORD] [--db-database=DB-DATABASE]
161
- [--db-link-types] [--db-include=DB-INCLUDE] [--db-schema=DB-SCHEMA] [--snowflake-account-id=SNOWFLAKE-ACCOUNT-ID]
162
- [--snowflake-warehouse=SNOWFLAKE-WAREHOUSE]
163
- $ stepzen import
164
- snowflake://[USER[:PASSWORD]@]ACCOUNT_IDENTIFIER[/DATABASE][?schema=<SCHEMA>[&warehouse=<WAREHOUSE>]]
165
- [--db-link-types] [--db-include=DB-INCLUDE]
159
+ $ stepzen import [SOURCE] [-h] [--non-interactive] [--dir <value>]
160
+
161
+ ARGUMENTS
162
+ SOURCE kind of the data source: curl, graphql, mysql, postgresql, snowflake (or a full DSN string)
163
+
164
+ FLAGS
165
+ -h, --help Show CLI help
166
+ --dir=<value> Working directory
167
+ --non-interactive Disable all interactive prompts
168
+
169
+ DESCRIPTION
170
+ Import a schema for an external data source or an API endpoint into your GraphQL API.
171
+ See more details with stepzen import [SOURCE] --help
172
+ ```
173
+
174
+ ## `stepzen import curl`
175
+
176
+ Import a schema for a REST endpoint into your GraphQL API (uses the curl syntax).
177
+
178
+ ```
179
+ USAGE
180
+ $ stepzen import curl [-h] [--non-interactive] [--dir <value>] [--name <value>] [--prefix <value>] [-H <value>]
181
+ [--header-param <value>] [--query-name <value>] [--query-type <value>] [--path-params <value>]
166
182
 
167
183
  FLAGS
168
184
  -H, --header=<value>...
169
- [curl, graphql] Specifies a request header to pass
185
+ Specifies a request header to pass
170
186
 
171
187
  Example:
172
188
  stepzen import curl https://example.com/api/customers \
@@ -175,29 +191,210 @@ FLAGS
175
191
  -h, --help
176
192
  Show CLI help
177
193
 
194
+ --dir=<value>
195
+ Working directory
196
+
197
+ --header-param=<value>...
198
+ Specifies a parameter in a header value. Can be formed by taking a -H, --header flag and replacing the variable part
199
+ of the header value with a $paramName placeholder. Repeat this flag once for each header with a parameter.
200
+
201
+ Example:
202
+ stepzen import curl https://example.com/api/customers \
203
+ -H "Authorization: apikey SecretAPIKeyValue" \
204
+ --header-param 'Authorization: apikey $apikey'
205
+
206
+ --name=<value>
207
+ Subfolder inside the workspace folder to save the imported schema files to. Defaults to the name of the imported
208
+ schema.
209
+
210
+ --non-interactive
211
+ Disable all interactive prompts
212
+
213
+ --path-params=<value>
214
+ Specifies path parameters in the URL path. Can be formed by taking the original path and replacing the variable
215
+ segments with $paramName placeholders.
216
+
217
+ Example:
218
+ stepzen import curl https://example.com/users/jane/posts/12 --path-params '/users/$userId/posts/$postId'
219
+
220
+ --prefix=<value>
221
+ Prefix to add to every type in the generated schema
222
+
223
+ --query-name=<value>
224
+ Property name to add to the Query type as a way to access the imported endpoint
225
+
226
+ --query-type=<value>
227
+ Name for the type returned by the curl request in the generated schema. The name specified by --query-type is not
228
+ prefixed by --prefix if both flags are present.
229
+
230
+ DESCRIPTION
231
+ Import a schema for a REST endpoint into your GraphQL API (uses the curl syntax).
232
+
233
+ stepzen import curl automatically introspects a REST endpoint, generates a GraphQL schema for accessing this endpoint
234
+ through a StepZen API, and adds the generated types and a query field into your GraphQL schema.
235
+ ```
236
+
237
+ ## `stepzen import graphql [URL]`
238
+
239
+ Import a GraphQL API as a subgraph into your GraphQL API.
240
+
241
+ ```
242
+ USAGE
243
+ $ stepzen import graphql [URL] [-h] [--non-interactive] [--dir <value>] [--name <value>] [--prefix <value>] [-H
244
+ <value>] [--header-param <value>]
245
+
246
+ FLAGS
247
+ -H, --header=<value>...
248
+ Specifies a request header to pass
249
+
250
+ Example:
251
+ stepzen import curl https://example.com/api/customers \
252
+ -H "Authorization: apikey SecretAPIKeyValue"
253
+
254
+ -h, --help
255
+ Show CLI help
256
+
257
+ --dir=<value>
258
+ Working directory
259
+
260
+ --header-param=<value>...
261
+ Specifies a parameter in a header value. Can be formed by taking a -H, --header flag and replacing the variable part
262
+ of the header value with a $paramName placeholder. Repeat this flag once for each header with a parameter.
263
+
264
+ Example:
265
+ stepzen import curl https://example.com/api/customers \
266
+ -H "Authorization: apikey SecretAPIKeyValue" \
267
+ --header-param 'Authorization: apikey $apikey'
268
+
269
+ --name=<value>
270
+ Subfolder inside the workspace folder to save the imported schema files to. Defaults to the name of the imported
271
+ schema.
272
+
273
+ --non-interactive
274
+ Disable all interactive prompts
275
+
276
+ --prefix=<value>
277
+ Prefix to add to every type in the generated schema
278
+
279
+ DESCRIPTION
280
+ Import a GraphQL API as a subgraph into your GraphQL API.
281
+
282
+ stepzen import graphql automatically introspects a GraphQL endpoint and merges the types, queries, mutations and
283
+ subscriptions for accessing this endpoint through a StepZen API into your GraphQL schema.
284
+ ```
285
+
286
+ ## `stepzen import mysql [DSN]`
287
+
288
+ Import a schema for a MySQL data source into your GraphQL API.
289
+
290
+ ```
291
+ USAGE
292
+ $ stepzen import mysql [DSN] [-h] [--non-interactive] [--dir <value>] [--name <value>] [--db-host <value>]
293
+ [--db-user <value>] [--db-password <value>] [--db-database <value>] [--db-link-types] [--db-include
294
+ tables-only|views-only|tables-and-views] [--db-use-deprecated-2022-naming]
295
+
296
+ ARGUMENTS
297
+ DSN (optional) Data Source Name (DSN) of a MySQL database.
298
+ Example: mysql://user:password@host:port/database
299
+
300
+ Flags, such as --db-host, override the corresponding parts of the DSN (if both are provided).
301
+
302
+ FLAGS
303
+ -h, --help
304
+ Show CLI help
305
+
306
+ --db-database=<value>
307
+ Name of database to import
308
+
309
+ --db-host=<value>
310
+ Database host and optional port (as HOST[:PORT])
311
+
312
+ --db-include=<option>
313
+ Should the generated GraphQL schema be based only on database views, only on tables or on both
314
+ <options: tables-only|views-only|tables-and-views>
315
+
316
+ --db-link-types
317
+ Automatically link types based on foreign key relationships using @materializer
318
+ (https://stepzen.com/docs/features/linking-types)
319
+
320
+ --db-password=<value>
321
+ Database password
322
+
323
+ --db-use-deprecated-2022-naming
324
+ Use the deprecated pre-2023 naming convention in the generated GraphQL schema:
325
+ - the generated type and property names are auto-capitalized into PascalCase
326
+ - the generated field names use the getCustomer and getCustomerList style.
327
+
328
+ On the other hand, when using the default naming convention:
329
+ - the generated type and property names match exactly the DB table and column names
330
+ - the generated field names use the customer and customerList style.
331
+
332
+ --db-user=<value>
333
+ Database user name
334
+
335
+ --dir=<value>
336
+ Working directory
337
+
338
+ --name=<value>
339
+ Subfolder inside the workspace folder to save the imported schema files to. Defaults to the name of the imported
340
+ schema.
341
+
342
+ --non-interactive
343
+ Disable all interactive prompts
344
+
345
+ DESCRIPTION
346
+ Import a schema for a MySQL data source into your GraphQL API.
347
+
348
+ stepzen import mysql automatically introspects a MySQL database, generates a GraphQL schema for accessing this
349
+ database through a StepZen API, and merges the generated types, queries and mutations into your into your GraphQL
350
+ schema.
351
+
352
+ ALIASES
353
+ $ stepzen import singlestore
354
+ ```
355
+
356
+ ## `stepzen import postgres [DSN]`
357
+
358
+ Import a schema for a PostgreSQL data source into your GraphQL API.
359
+
360
+ ```
361
+ USAGE
362
+ $ stepzen import postgres [DSN] [-h] [--non-interactive] [--dir <value>] [--name <value>] [--db-host <value>]
363
+ [--db-user <value>] [--db-password <value>] [--db-database <value>] [--db-schema <value>] [--db-link-types]
364
+ [--db-include tables-only|views-only|tables-and-views] [--db-use-deprecated-2022-naming]
365
+
366
+ ARGUMENTS
367
+ DSN (optional) Data Source Name (DSN) of a PostgreSQL database.
368
+ Example: postgresql://user:password@host:port/database?schema=schema
369
+
370
+ Flags, such as --db-host, override the corresponding parts of the DSN (if both are provided).
371
+
372
+ FLAGS
373
+ -h, --help
374
+ Show CLI help
375
+
178
376
  --db-database=<value>
179
- [mysql, postgresql, snowflake] Name of database to import
377
+ Name of database to import
180
378
 
181
379
  --db-host=<value>
182
- [mysql, postgresql] Database host and optional port (as HOST[:PORT])
380
+ Database host and optional port (as HOST[:PORT])
183
381
 
184
382
  --db-include=<option>
185
- [mysql, postgresql, snowflake] Should the generated GraphQL schema be based only on database views, only on tables
186
- or on both
383
+ Should the generated GraphQL schema be based only on database views, only on tables or on both
187
384
  <options: tables-only|views-only|tables-and-views>
188
385
 
189
386
  --db-link-types
190
- [mysql, postgresql, snowflake] Automatically link types based on foreign key relationships using @materializer
387
+ Automatically link types based on foreign key relationships using @materializer
191
388
  (https://stepzen.com/docs/features/linking-types)
192
389
 
193
390
  --db-password=<value>
194
- [mysql, postgresql, snowflake] Database password
391
+ Database password
195
392
 
196
393
  --db-schema=<value>
197
- [postgresql, snowflake] Database schema to import tables from (default: public)
394
+ Database schema to import tables from (default: public)
198
395
 
199
396
  --db-use-deprecated-2022-naming
200
- [mysql, postgresql] Use the deprecated pre-2023 naming convention in the generated GraphQL schema:
397
+ Use the deprecated pre-2023 naming convention in the generated GraphQL schema:
201
398
  - the generated type and property names are auto-capitalized into PascalCase
202
399
  - the generated field names use the getCustomer and getCustomerList style.
203
400
 
@@ -206,51 +403,242 @@ FLAGS
206
403
  - the generated field names use the customer and customerList style.
207
404
 
208
405
  --db-user=<value>
209
- [mysql, postgresql, snowflake] Database user name
406
+ Database user name
210
407
 
211
408
  --dir=<value>
212
409
  Working directory
213
410
 
214
- --header-param=<value>...
215
- [curl, graphql] Specifies a parameter in a header value. Can be formed by taking a -H, --header flag and replacing
216
- the variable part of the header value with a $paramName placeholder. Repeat this flag once for each header with a
217
- parameter.
411
+ --name=<value>
412
+ Subfolder inside the workspace folder to save the imported schema files to. Defaults to the name of the imported
413
+ schema.
218
414
 
219
- Example:
220
- stepzen import curl https://example.com/api/customers \
221
- -H "Authorization: apikey SecretAPIKeyValue" \
222
- --header-param 'Authorization: apikey $apikey'
415
+ --non-interactive
416
+ Disable all interactive prompts
417
+
418
+ DESCRIPTION
419
+ Import a schema for a PostgreSQL data source into your GraphQL API.
420
+
421
+ stepzen import postgresql automatically introspects a PostgreSQL database, generates a GraphQL schema for accessing
422
+ this database through a StepZen API, and merges the generated types, queries and mutations into your GraphQL schema.
423
+
424
+ ALIASES
425
+ $ stepzen import postgres
426
+ ```
427
+
428
+ ## `stepzen import postgresql [DSN]`
429
+
430
+ Import a schema for a PostgreSQL data source into your GraphQL API.
431
+
432
+ ```
433
+ USAGE
434
+ $ stepzen import postgresql [DSN] [-h] [--non-interactive] [--dir <value>] [--name <value>] [--db-host <value>]
435
+ [--db-user <value>] [--db-password <value>] [--db-database <value>] [--db-schema <value>] [--db-link-types]
436
+ [--db-include tables-only|views-only|tables-and-views] [--db-use-deprecated-2022-naming]
437
+
438
+ ARGUMENTS
439
+ DSN (optional) Data Source Name (DSN) of a PostgreSQL database.
440
+ Example: postgresql://user:password@host:port/database?schema=schema
441
+
442
+ Flags, such as --db-host, override the corresponding parts of the DSN (if both are provided).
443
+
444
+ FLAGS
445
+ -h, --help
446
+ Show CLI help
447
+
448
+ --db-database=<value>
449
+ Name of database to import
450
+
451
+ --db-host=<value>
452
+ Database host and optional port (as HOST[:PORT])
453
+
454
+ --db-include=<option>
455
+ Should the generated GraphQL schema be based only on database views, only on tables or on both
456
+ <options: tables-only|views-only|tables-and-views>
457
+
458
+ --db-link-types
459
+ Automatically link types based on foreign key relationships using @materializer
460
+ (https://stepzen.com/docs/features/linking-types)
461
+
462
+ --db-password=<value>
463
+ Database password
464
+
465
+ --db-schema=<value>
466
+ Database schema to import tables from (default: public)
467
+
468
+ --db-use-deprecated-2022-naming
469
+ Use the deprecated pre-2023 naming convention in the generated GraphQL schema:
470
+ - the generated type and property names are auto-capitalized into PascalCase
471
+ - the generated field names use the getCustomer and getCustomerList style.
472
+
473
+ On the other hand, when using the default naming convention:
474
+ - the generated type and property names match exactly the DB table and column names
475
+ - the generated field names use the customer and customerList style.
476
+
477
+ --db-user=<value>
478
+ Database user name
479
+
480
+ --dir=<value>
481
+ Working directory
223
482
 
224
483
  --name=<value>
225
484
  Subfolder inside the workspace folder to save the imported schema files to. Defaults to the name of the imported
226
485
  schema.
227
486
 
228
- --path-params=<value>
229
- [curl] Specifies path parameters in the URL path. Can be formed by taking the original path and replacing the
230
- variable segments with $paramName placeholders.
487
+ --non-interactive
488
+ Disable all interactive prompts
231
489
 
232
- Example:
233
- stepzen import curl https://example.com/users/jane/posts/12 --path-params '/users/$userId/posts/$postId'
490
+ DESCRIPTION
491
+ Import a schema for a PostgreSQL data source into your GraphQL API.
234
492
 
235
- --prefix=<value>
236
- [curl, graphql] Prefix to add to every type in the generated schema
493
+ stepzen import postgresql automatically introspects a PostgreSQL database, generates a GraphQL schema for accessing
494
+ this database through a StepZen API, and merges the generated types, queries and mutations into your GraphQL schema.
237
495
 
238
- --query-name=<value>
239
- [curl] [curl] Property name to add to the Query type as a way to access the imported endpoint
496
+ ALIASES
497
+ $ stepzen import postgres
498
+ ```
240
499
 
241
- --query-type=<value>
242
- [curl] Name for the type returned by the curl request in the generated schema. The name specified by --query-type is
243
- not prefixed by --prefix if both flags are present.
500
+ ## `stepzen import singlestore [DSN]`
501
+
502
+ Import a schema for a MySQL data source into your GraphQL API.
503
+
504
+ ```
505
+ USAGE
506
+ $ stepzen import singlestore [DSN] [-h] [--non-interactive] [--dir <value>] [--name <value>] [--db-host <value>]
507
+ [--db-user <value>] [--db-password <value>] [--db-database <value>] [--db-link-types] [--db-include
508
+ tables-only|views-only|tables-and-views] [--db-use-deprecated-2022-naming]
509
+
510
+ ARGUMENTS
511
+ DSN (optional) Data Source Name (DSN) of a MySQL database.
512
+ Example: mysql://user:password@host:port/database
513
+
514
+ Flags, such as --db-host, override the corresponding parts of the DSN (if both are provided).
515
+
516
+ FLAGS
517
+ -h, --help
518
+ Show CLI help
519
+
520
+ --db-database=<value>
521
+ Name of database to import
522
+
523
+ --db-host=<value>
524
+ Database host and optional port (as HOST[:PORT])
525
+
526
+ --db-include=<option>
527
+ Should the generated GraphQL schema be based only on database views, only on tables or on both
528
+ <options: tables-only|views-only|tables-and-views>
529
+
530
+ --db-link-types
531
+ Automatically link types based on foreign key relationships using @materializer
532
+ (https://stepzen.com/docs/features/linking-types)
533
+
534
+ --db-password=<value>
535
+ Database password
536
+
537
+ --db-use-deprecated-2022-naming
538
+ Use the deprecated pre-2023 naming convention in the generated GraphQL schema:
539
+ - the generated type and property names are auto-capitalized into PascalCase
540
+ - the generated field names use the getCustomer and getCustomerList style.
541
+
542
+ On the other hand, when using the default naming convention:
543
+ - the generated type and property names match exactly the DB table and column names
544
+ - the generated field names use the customer and customerList style.
545
+
546
+ --db-user=<value>
547
+ Database user name
548
+
549
+ --dir=<value>
550
+ Working directory
551
+
552
+ --name=<value>
553
+ Subfolder inside the workspace folder to save the imported schema files to. Defaults to the name of the imported
554
+ schema.
555
+
556
+ --non-interactive
557
+ Disable all interactive prompts
558
+
559
+ DESCRIPTION
560
+ Import a schema for a MySQL data source into your GraphQL API.
561
+
562
+ stepzen import mysql automatically introspects a MySQL database, generates a GraphQL schema for accessing this
563
+ database through a StepZen API, and merges the generated types, queries and mutations into your into your GraphQL
564
+ schema.
565
+
566
+ ALIASES
567
+ $ stepzen import singlestore
568
+ ```
569
+
570
+ ## `stepzen import snowflake [DSN]`
571
+
572
+ Import a schema for a Snowflake data source into your GraphQL API.
573
+
574
+ ```
575
+ USAGE
576
+ $ stepzen import snowflake [DSN] [-h] [--non-interactive] [--dir <value>] [--name <value>] [--db-user <value>]
577
+ [--db-password <value>] [--db-database <value>] [--db-schema <value>] [--db-link-types] [--db-include
578
+ tables-only|views-only|tables-and-views] [--db-use-deprecated-2022-naming] [--snowflake-account-id <value>]
579
+ [--snowflake-warehouse <value>]
580
+
581
+ ARGUMENTS
582
+ DSN (optional) Data Source Name (DSN) of a Snowflake database.
583
+ Example: snowflake://user:password@orgname-accountname/database?warehouse=warehouse&schema=schema
584
+
585
+ Flags, such as --db-host, override the corresponding parts of the DSN (if both are provided).
586
+
587
+ FLAGS
588
+ -h, --help
589
+ Show CLI help
590
+
591
+ --db-database=<value>
592
+ Name of database to import
593
+
594
+ --db-include=<option>
595
+ Should the generated GraphQL schema be based only on database views, only on tables or on both
596
+ <options: tables-only|views-only|tables-and-views>
597
+
598
+ --db-link-types
599
+ Automatically link types based on foreign key relationships using @materializer
600
+ (https://stepzen.com/docs/features/linking-types)
601
+
602
+ --db-password=<value>
603
+ Database password
604
+
605
+ --db-schema=<value>
606
+ Database schema to import tables from (default: PUBLIC)
607
+
608
+ --db-use-deprecated-2022-naming
609
+ Use the deprecated pre-2023 naming convention in the generated GraphQL schema:
610
+ - the generated type and property names are auto-capitalized into PascalCase
611
+ - the generated field names use the getCustomer and getCustomerList style.
612
+
613
+ On the other hand, when using the default naming convention:
614
+ - the generated type and property names match exactly the DB table and column names
615
+ - the generated field names use the customer and customerList style.
616
+
617
+ --db-user=<value>
618
+ Database user name
619
+
620
+ --dir=<value>
621
+ Working directory
622
+
623
+ --name=<value>
624
+ Subfolder inside the workspace folder to save the imported schema files to. Defaults to the name of the imported
625
+ schema.
626
+
627
+ --non-interactive
628
+ Disable all interactive prompts
244
629
 
245
630
  --snowflake-account-id=<value>
246
- [snowflake] Snowflake account identifier in the orgname-accountname format. For more information, see the Snowflake
631
+ Snowflake account identifier in the orgname-accountname format. For more information, see the Snowflake
247
632
  documentation at https://docs.snowflake.com/en/user-guide/admin-account-identifier.html.
248
633
 
249
634
  --snowflake-warehouse=<value>
250
- [snowflake] Snowflake warehouse
635
+ Snowflake warehouse
251
636
 
252
637
  DESCRIPTION
253
- Import a schema for an external data source or an API endpoint to your GraphQL API.
638
+ Import a schema for a Snowflake data source into your GraphQL API.
639
+
640
+ stepzen import snowflake automatically introspects a Snowflake database, generates a GraphQL schema for accessing this
641
+ database through a StepZen API, and merges the generated types, queries and mutations into your GraphQL schema.
254
642
  ```
255
643
 
256
644
  ## `stepzen init`
@@ -259,10 +647,13 @@ Initialize a StepZen workspace in the current directory.
259
647
 
260
648
  ```
261
649
  USAGE
262
- $ stepzen init [DIRECTORY] [-h]
650
+ $ stepzen init [DIRECTORY] [-h] [--non-interactive] [--endpoint <value>] [--yes]
263
651
 
264
652
  FLAGS
265
- -h, --help Show CLI help
653
+ -h, --help Show CLI help
654
+ --endpoint=<value> Endpoint name (e.g. /api/myapp)
655
+ --non-interactive Disable all interactive prompts
656
+ --yes Accept default answers to interactive prompts
266
657
 
267
658
  DESCRIPTION
268
659
  Initialize a StepZen workspace in the current directory.
@@ -274,7 +665,7 @@ List endpoints, schemas and configuration sets in your StepZen account.
274
665
 
275
666
  ```
276
667
  USAGE
277
- $ stepzen list [TYPE] [-h]
668
+ $ stepzen list [TYPE] [-h] [--non-interactive]
278
669
 
279
670
  ARGUMENTS
280
671
  TYPE
@@ -286,7 +677,8 @@ ARGUMENTS
286
677
  configurationsets [DEPRECATED] - StepZen configuration sets uploaded with stepzen upload (or stepzen start)
287
678
 
288
679
  FLAGS
289
- -h, --help Show CLI help
680
+ -h, --help Show CLI help
681
+ --non-interactive Disable all interactive prompts
290
682
 
291
683
  DESCRIPTION
292
684
  List endpoints, schemas and configuration sets in your StepZen account.
@@ -298,7 +690,7 @@ Log in to StepZen.
298
690
 
299
691
  ```
300
692
  USAGE
301
- $ stepzen login [-h] [-a <value> | | --public] [-k <value> | | ]
693
+ $ stepzen login [-h] [--non-interactive] [-a <value> | | --public] [-k <value> | | ]
302
694
 
303
695
  FLAGS
304
696
  -a, --account=<value> StepZen account name (copy from https://stepzen.com/account). If not provided, the CLI prompts
@@ -306,6 +698,7 @@ FLAGS
306
698
  -h, --help Show CLI help
307
699
  -k, --adminkey=<value> Admin key (copy from https://stepzen.com/account) If not provided, the CLI prompts the users
308
700
  to enter one.
701
+ --non-interactive Disable all interactive prompts
309
702
  --public Create a public anonymous StepZen account and use it. This is handy for trying StepZen out,
310
703
  but it not suitable for handling private data as all endpoints created with a public account
311
704
  will be public.
@@ -320,10 +713,11 @@ Log out of StepZen.
320
713
 
321
714
  ```
322
715
  USAGE
323
- $ stepzen logout [-h]
716
+ $ stepzen logout [-h] [--non-interactive]
324
717
 
325
718
  FLAGS
326
- -h, --help Show CLI help
719
+ -h, --help Show CLI help
720
+ --non-interactive Disable all interactive prompts
327
721
 
328
722
  DESCRIPTION
329
723
  Log out of StepZen.
@@ -335,8 +729,8 @@ Send a GraphQL request to a StepZen endpoint and print the response, using the A
335
729
 
336
730
  ```
337
731
  USAGE
338
- $ stepzen request [QUERY] [-h] [--dir <value> | --endpoint <value>] [-H <value>] [--operation-name <value>]
339
- [--var <value>] [--var-file <value>] [-f <value>]
732
+ $ stepzen request [QUERY] [-h] [--non-interactive] [--dir <value> | --endpoint <value>] [-H <value>]
733
+ [--operation-name <value>] [--var <value>] [--var-file <value>] [-f <value>]
340
734
 
341
735
  ARGUMENTS
342
736
  QUERY GraphQL query (could include a query, a mutation or a subscription).
@@ -369,6 +763,9 @@ FLAGS
369
763
  --endpoint=<value>
370
764
  StepZen endpoint to call (defaults to the endpoint in current StepZen workspace)
371
765
 
766
+ --non-interactive
767
+ Disable all interactive prompts
768
+
372
769
  --operation-name=<value>
373
770
  Specify the operation name (in case if the provided query includes multiple operations)
374
771
 
@@ -403,7 +800,8 @@ Manage the local StepZen service instance (requires Docker).
403
800
 
404
801
  ```
405
802
  USAGE
406
- $ stepzen service [ACTION] [-h] [--dsn <value> | --reset-auto | --prompt] [--port <value>]
803
+ $ stepzen service [ACTION] [-h] [--non-interactive] [--dsn <value> | --reset-auto | --prompt] [--port
804
+ <value>]
407
805
 
408
806
  ARGUMENTS
409
807
  ACTION
@@ -426,14 +824,15 @@ ARGUMENTS
426
824
  If no action is provided, print the service status and exit.
427
825
 
428
826
  FLAGS
429
- -h, --help Show CLI help
430
- --dsn=<value> DSN of a StepZen metadata database, e.g. postgres://user:password@172.17.0.1:5432/zenctl
431
- --port=<value> Override the TCP port on which the local StepZen service instance will listen for connections (port
432
- 9000 by default).
433
- --prompt Opens an interactive prompt to ask for database details (or fails, if running in a non-interactive
434
- mode).
435
- --reset-auto Create fresh empty metadata database. Note: all existing endpoints will be deleted and you will be
436
- logged out.
827
+ -h, --help Show CLI help
828
+ --dsn=<value> DSN of a StepZen metadata database, e.g. postgres://user:password@172.17.0.1:5432/zenctl
829
+ --non-interactive Disable all interactive prompts
830
+ --port=<value> Override the TCP port on which the local StepZen service instance will listen for connections (port
831
+ 9000 by default).
832
+ --prompt Opens an interactive prompt to ask for database details (or fails, if running in a non-interactive
833
+ mode).
834
+ --reset-auto Create fresh empty metadata database. Note: all existing endpoints will be deleted and you will be
835
+ logged out.
437
836
 
438
837
  DESCRIPTION
439
838
  Manage the local StepZen service instance (requires Docker).
@@ -451,7 +850,8 @@ Deploy your schema to StepZen, and then redeploy on every change.
451
850
 
452
851
  ```
453
852
  USAGE
454
- $ stepzen start [-h] [--dir <value>] [--endpoint <value>] [--dashboard web|local|none] [--port <value>]
853
+ $ stepzen start [-h] [--non-interactive] [--dir <value>] [--endpoint <value>] [--dashboard
854
+ web|local|none] [--port <value>]
455
855
 
456
856
  FLAGS
457
857
  -h, --help
@@ -470,6 +870,9 @@ FLAGS
470
870
  --endpoint=<value>
471
871
  Override workspace endpoint
472
872
 
873
+ --non-interactive
874
+ Disable all interactive prompts
875
+
473
876
  --port=<value>
474
877
  [default: 5001] Port for the local GraphiQL dashboard (when using --dashboard=local)
475
878
 
@@ -483,16 +886,17 @@ DESCRIPTION
483
886
 
484
887
  ```
485
888
  USAGE
486
- $ stepzen upload [TYPE] [DESTINATION] [-h] [--dir <value> | --file <value>] [--silent]
889
+ $ stepzen upload [TYPE] [DESTINATION] [-h] [--non-interactive] [--dir <value> | --file <value>] [--silent]
487
890
 
488
891
  ARGUMENTS
489
892
  TYPE (configurationset|schema) type
490
893
  DESTINATION destination
491
894
 
492
895
  FLAGS
493
- -h, --help Show CLI help
494
- --dir=<value> A directory to upload
495
- --file=<value> A file to upload
896
+ -h, --help Show CLI help
897
+ --dir=<value> A directory to upload
898
+ --file=<value> A file to upload
899
+ --non-interactive Disable all interactive prompts
496
900
  --silent
497
901
 
498
902
  DESCRIPTION
@@ -527,13 +931,14 @@ View your StepZen credentials.
527
931
 
528
932
  ```
529
933
  USAGE
530
- $ stepzen whoami [-h] [--showkeys | --account | --adminkey | --apikey]
934
+ $ stepzen whoami [-h] [--non-interactive] [--showkeys | --account | --adminkey | --apikey]
531
935
 
532
936
  FLAGS
533
- -h, --help Show CLI help
937
+ -h, --help Show CLI help
534
938
  --account
535
939
  --adminkey
536
940
  --apikey
941
+ --non-interactive Disable all interactive prompts
537
942
  --showkeys
538
943
 
539
944
  DESCRIPTION