@graphcommerce/hygraph-cli 9.0.4-canary.9 → 9.0.4

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/CHANGELOG.md CHANGED
@@ -1,24 +1,18 @@
1
1
  # @graphcommerce/hygraph-cli
2
2
 
3
- ## 9.0.4-canary.9
3
+ ## 9.0.4
4
4
 
5
- ## 9.0.4-canary.8
5
+ ## 9.0.3
6
6
 
7
- ## 9.0.4-canary.7
7
+ ## 9.0.3-canary.0
8
8
 
9
- ## 9.0.4-canary.6
9
+ ## 9.0.2
10
10
 
11
- ## 9.0.4-canary.5
11
+ ## 9.0.2-canary.0
12
12
 
13
- ## 9.0.4-canary.4
13
+ ## 9.0.1
14
14
 
15
- ## 9.0.4-canary.3
16
-
17
- ## 9.0.4-canary.2
18
-
19
- ## 9.0.4-canary.1
20
-
21
- ## 9.0.4-canary.0
15
+ ## 9.0.1-canary.1
22
16
 
23
17
  ## 9.0.0
24
18
 
@@ -54,26 +54,26 @@ function migrationActionFactory(schema, client) {
54
54
  * management sdk.
55
55
  *
56
56
  * MigrationAction() is better suited because it is a single function for all actions. More
57
- * importantly, if the action fails, because a field with the apiID already exists for instance.
58
- * it will skip this action but still continue the whole migration, while the management sdk
59
- * function will bail.
57
+ * importantly, if the action fails, because a field with the apiID already exists for instance. it
58
+ * will skip this action but still continue the whole migration, while the management sdk function
59
+ * will bail.
60
60
  *
61
61
  * It takes the schema as argument, which is always the same.
62
62
  *
63
- * Then it takes the type of schema entity you want to do an action upon, and the action you want
64
- * to do.
63
+ * Then it takes the type of schema entity you want to do an action upon, and the action you want to
64
+ * do.
65
65
  *
66
- * The fourth arguments are the props that belong to the action you want to do. For instance, if
67
- * you want to create a model, you need to pass the props that belong to a model.
66
+ * The fourth arguments are the props that belong to the action you want to do. For instance, if you
67
+ * want to create a model, you need to pass the props that belong to a model.
68
68
  *
69
- * The last two arguments are optional. If you want to create a field, you need to pass the apiId
70
- * of the model or component you want to create the field on. If you want to create a field on a
69
+ * The last two arguments are optional. If you want to create a field, you need to pass the apiId of
70
+ * the model or component you want to create the field on. If you want to create a field on a
71
71
  * component, you also need to pass the parentType, which is either 'model' or 'component'.
72
72
  */
73
73
  const migrationAction = (_schema, type, action, props, parentApiId, parentType) => {
74
74
  /**
75
- * Check if the entity already exists. If an update or deletion is made, it does not matter if
76
- * the entity already exists
75
+ * Check if the entity already exists.
76
+ * If an update or deletion is made, it does not matter if the entity already exists
77
77
  */
78
78
  const alreadyExists = () => {
79
79
  if (action !== 'create') {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/hygraph-cli",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "9.0.4-canary.9",
5
+ "version": "9.0.4",
6
6
  "scripts": {
7
7
  "dev": "tsc --preserveWatchOutput --watch",
8
8
  "build": "tsc",
@@ -20,10 +20,10 @@
20
20
  },
21
21
  "peerDependencies": {
22
22
  "@apollo/client": "*",
23
- "@graphcommerce/eslint-config-pwa": "^9.0.4-canary.9",
24
- "@graphcommerce/next-config": "^9.0.4-canary.9",
25
- "@graphcommerce/prettier-config-pwa": "^9.0.4-canary.9",
26
- "@graphcommerce/typescript-config-pwa": "^9.0.4-canary.9",
23
+ "@graphcommerce/eslint-config-pwa": "^9.0.4",
24
+ "@graphcommerce/next-config": "^9.0.4",
25
+ "@graphcommerce/prettier-config-pwa": "^9.0.4",
26
+ "@graphcommerce/typescript-config-pwa": "^9.0.4",
27
27
  "dotenv": "^16.1.4"
28
28
  },
29
29
  "devDependencies": {
@@ -136,20 +136,20 @@ export function migrationActionFactory(schema: Schema, client: Client) {
136
136
  * management sdk.
137
137
  *
138
138
  * MigrationAction() is better suited because it is a single function for all actions. More
139
- * importantly, if the action fails, because a field with the apiID already exists for instance.
140
- * it will skip this action but still continue the whole migration, while the management sdk
141
- * function will bail.
139
+ * importantly, if the action fails, because a field with the apiID already exists for instance. it
140
+ * will skip this action but still continue the whole migration, while the management sdk function
141
+ * will bail.
142
142
  *
143
143
  * It takes the schema as argument, which is always the same.
144
144
  *
145
- * Then it takes the type of schema entity you want to do an action upon, and the action you want
146
- * to do.
145
+ * Then it takes the type of schema entity you want to do an action upon, and the action you want to
146
+ * do.
147
147
  *
148
- * The fourth arguments are the props that belong to the action you want to do. For instance, if
149
- * you want to create a model, you need to pass the props that belong to a model.
148
+ * The fourth arguments are the props that belong to the action you want to do. For instance, if you
149
+ * want to create a model, you need to pass the props that belong to a model.
150
150
  *
151
- * The last two arguments are optional. If you want to create a field, you need to pass the apiId
152
- * of the model or component you want to create the field on. If you want to create a field on a
151
+ * The last two arguments are optional. If you want to create a field, you need to pass the apiId of
152
+ * the model or component you want to create the field on. If you want to create a field on a
153
153
  * component, you also need to pass the parentType, which is either 'model' or 'component'.
154
154
  */
155
155
  const migrationAction = (
@@ -161,8 +161,8 @@ export function migrationActionFactory(schema: Schema, client: Client) {
161
161
  parentType?: 'model' | 'component' | 'enumeration',
162
162
  ) => {
163
163
  /**
164
- * Check if the entity already exists. If an update or deletion is made, it does not matter if
165
- * the entity already exists
164
+ * Check if the entity already exists.
165
+ * If an update or deletion is made, it does not matter if the entity already exists
166
166
  */
167
167
  const alreadyExists = () => {
168
168
  if (action !== 'create') {