@graphcommerce/hygraph-cli 9.1.0-canary.15 → 9.1.0-canary.17
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 +4 -0
- package/dist/index.js +4 -4
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import fs from 'fs';
|
|
|
2
2
|
import { loadConfig } from '@graphcommerce/next-config';
|
|
3
3
|
import dotenv from 'dotenv';
|
|
4
4
|
import prompts from 'prompts';
|
|
5
|
-
import { SimpleFieldType,
|
|
6
|
-
import { gql, ApolloClient,
|
|
5
|
+
import { SimpleFieldType, VisibilityTypes, RelationalFieldType, Client } from '@hygraph/management-sdk';
|
|
6
|
+
import { gql, ApolloClient, InMemoryCache, HttpLink } from '@apollo/client';
|
|
7
7
|
import gql$1 from 'graphql-tag';
|
|
8
8
|
|
|
9
9
|
const capitalize = (word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
|
|
@@ -52,7 +52,7 @@ function migrationActionFactory(schema, client) {
|
|
|
52
52
|
unionField: (innerprops) => client.deleteField(innerprops),
|
|
53
53
|
componentUnionField: (innerprops) => client.deleteField(innerprops)
|
|
54
54
|
}
|
|
55
|
-
} :
|
|
55
|
+
} : void 0;
|
|
56
56
|
const migrationAction = (_schema, type, action, props, parentApiId, parentType) => {
|
|
57
57
|
const alreadyExists = () => {
|
|
58
58
|
if (action !== "create") {
|
|
@@ -724,7 +724,7 @@ class UpsertClient extends Client {
|
|
|
724
724
|
upsertSimpleField(data) {
|
|
725
725
|
const model = this.schema.models.find((m) => m.apiId === data.parentApiId);
|
|
726
726
|
const exists = model?.fields.some((f) => f.apiId === data.apiId);
|
|
727
|
-
return exists ? this.createSimpleField(data) : this.updateSimpleField({ ...data, embeddableModels:
|
|
727
|
+
return exists ? this.createSimpleField(data) : this.updateSimpleField({ ...data, embeddableModels: void 0 });
|
|
728
728
|
}
|
|
729
729
|
// upsertRemoteField(data: BatchMigrationCreateRemoteFieldInput) {
|
|
730
730
|
// const model = this.schema.models.find((m) => m.apiId === data.parentApiId)
|
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.1.0-canary.
|
|
5
|
+
"version": "9.1.0-canary.17",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@apollo/client": "*",
|
|
28
|
-
"@graphcommerce/eslint-config-pwa": "^9.1.0-canary.
|
|
29
|
-
"@graphcommerce/next-config": "^9.1.0-canary.
|
|
30
|
-
"@graphcommerce/prettier-config-pwa": "^9.1.0-canary.
|
|
31
|
-
"@graphcommerce/typescript-config-pwa": "^9.1.0-canary.
|
|
28
|
+
"@graphcommerce/eslint-config-pwa": "^9.1.0-canary.17",
|
|
29
|
+
"@graphcommerce/next-config": "^9.1.0-canary.17",
|
|
30
|
+
"@graphcommerce/prettier-config-pwa": "^9.1.0-canary.17",
|
|
31
|
+
"@graphcommerce/typescript-config-pwa": "^9.1.0-canary.17",
|
|
32
32
|
"dotenv": "^16.1.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|