@orion-js/graphql 3.0.17 → 3.0.20
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/LICENSE
CHANGED
|
@@ -8,6 +8,7 @@ const isArray_1 = __importDefault(require("lodash/isArray"));
|
|
|
8
8
|
const graphql_1 = require("graphql");
|
|
9
9
|
const schema_1 = require("@orion-js/schema");
|
|
10
10
|
const getScalar_1 = __importDefault(require("../getType/getScalar"));
|
|
11
|
+
const getStaticFields_1 = require("../../resolversSchemas/getStaticFields");
|
|
11
12
|
const storedModelInput = {};
|
|
12
13
|
const getModelInput = function (model, fields) {
|
|
13
14
|
if (storedModelInput[model.name]) {
|
|
@@ -32,7 +33,7 @@ function getParams(type) {
|
|
|
32
33
|
if (!model || !model.__isModel)
|
|
33
34
|
throw new Error(`A type is not a Model`);
|
|
34
35
|
const fields = {};
|
|
35
|
-
for (const field of
|
|
36
|
+
for (const field of (0, getStaticFields_1.getStaticFields)(model)) {
|
|
36
37
|
fields[field.key] = {
|
|
37
38
|
type: getParams(field.type)
|
|
38
39
|
};
|
|
@@ -4,13 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const isArray_1 = __importDefault(require("lodash/isArray"));
|
|
7
|
+
const getStaticFields_1 = require("./getStaticFields");
|
|
7
8
|
async function getBasicQuery(field) {
|
|
8
9
|
if (!field.type)
|
|
9
10
|
return '';
|
|
10
11
|
if (((0, isArray_1.default)(field.type) && field.type[0].__model) || field.type.__model) {
|
|
11
12
|
const model = (0, isArray_1.default)(field.type) ? field.type[0].__model : field.type.__model;
|
|
12
13
|
const fields = [];
|
|
13
|
-
for (const field of
|
|
14
|
+
for (const field of (0, getStaticFields_1.getStaticFields)(model)) {
|
|
14
15
|
fields.push(await getBasicQuery(field));
|
|
15
16
|
}
|
|
16
17
|
const key = field.key ? `${field.key} ` : '';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orion-js/graphql",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.20",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"author": "nicolaslopezj",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@orion-js/helpers": "^3.0.17",
|
|
17
17
|
"@orion-js/http": "^3.0.17",
|
|
18
|
-
"@orion-js/models": "^3.0.
|
|
18
|
+
"@orion-js/models": "^3.0.20",
|
|
19
19
|
"@orion-js/resolvers": "^3.0.17",
|
|
20
20
|
"@orion-js/schema": "^3.0.17",
|
|
21
|
-
"@orion-js/typed-model": "^3.0.
|
|
21
|
+
"@orion-js/typed-model": "^3.0.20",
|
|
22
22
|
"apollo-server-core": "3.5.0",
|
|
23
23
|
"graphql-iso-date": "^3.6.1",
|
|
24
24
|
"graphql-subscriptions": "^2.0.0",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "ed37da2a1a61a9a4c0b9935d77e29d83a423e199"
|
|
47
47
|
}
|