graphql-form 0.1.4 → 0.1.6
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/lib/__tests__/consts.js
CHANGED
@@ -3,30 +3,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fieldsNodeWithArgsWithInput = exports.fieldsNodeWithArgs = exports.extenedFields = exports.fields = exports.nodes = exports.singleNode = exports.nodeWithArgs = exports.inputNode = exports.typeNode = void 0;
|
4
4
|
var graphql_js_tree_1 = require("graphql-js-tree");
|
5
5
|
// Global Arrange
|
6
|
-
exports.typeNode = {
|
6
|
+
exports.typeNode = (0, graphql_js_tree_1.createParserField)({
|
7
7
|
name: 'Type',
|
8
8
|
args: [],
|
9
9
|
data: { type: graphql_js_tree_1.TypeDefinition.ObjectTypeDefinition },
|
10
10
|
directives: [],
|
11
11
|
interfaces: [],
|
12
12
|
type: { fieldType: { name: 'type', type: graphql_js_tree_1.Options.name } },
|
13
|
-
};
|
14
|
-
exports.inputNode = {
|
13
|
+
});
|
14
|
+
exports.inputNode = (0, graphql_js_tree_1.createParserField)({
|
15
15
|
name: 'Input',
|
16
16
|
args: [],
|
17
17
|
data: { type: graphql_js_tree_1.TypeDefinition.InputObjectTypeDefinition },
|
18
18
|
directives: [],
|
19
19
|
interfaces: [],
|
20
20
|
type: { fieldType: { name: 'type', type: graphql_js_tree_1.Options.name } },
|
21
|
-
};
|
22
|
-
exports.nodeWithArgs = {
|
21
|
+
});
|
22
|
+
exports.nodeWithArgs = (0, graphql_js_tree_1.createParserField)({
|
23
23
|
name: 'Root',
|
24
24
|
args: [exports.typeNode, exports.inputNode],
|
25
25
|
data: { type: graphql_js_tree_1.TypeDefinition.ObjectTypeDefinition },
|
26
26
|
directives: [],
|
27
27
|
interfaces: [],
|
28
28
|
type: { fieldType: { name: 'type', type: graphql_js_tree_1.Options.name } },
|
29
|
-
};
|
29
|
+
});
|
30
30
|
exports.singleNode = [exports.typeNode];
|
31
31
|
exports.nodes = [exports.typeNode, exports.inputNode, exports.nodeWithArgs];
|
32
32
|
exports.fields = { test: { node: exports.typeNode, value: 5 } };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/__tests__/consts.ts"],"names":[],"mappings":";;;AACA,
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/__tests__/consts.ts"],"names":[],"mappings":";;;AACA,mDAA0F;AAE1F,iBAAiB;AACJ,QAAA,QAAQ,GAAgB,IAAA,mCAAiB,EAAC;IACnD,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE,IAAI,EAAE,gCAAc,CAAC,oBAAoB,EAAE;IACnD,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAO,CAAC,IAAI,EAAE,EAAE;CAC5D,CAAC,CAAC;AAEU,QAAA,SAAS,GAAgB,IAAA,mCAAiB,EAAC;IACpD,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,EAAE;IACR,IAAI,EAAE,EAAE,IAAI,EAAE,gCAAc,CAAC,yBAAyB,EAAE;IACxD,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAO,CAAC,IAAI,EAAE,EAAE;CAC5D,CAAC,CAAC;AAEU,QAAA,YAAY,GAAgB,IAAA,mCAAiB,EAAC;IACvD,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,CAAC,gBAAQ,EAAE,iBAAS,CAAC;IAC3B,IAAI,EAAE,EAAE,IAAI,EAAE,gCAAc,CAAC,oBAAoB,EAAE;IACnD,UAAU,EAAE,EAAE;IACd,UAAU,EAAE,EAAE;IACd,IAAI,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAO,CAAC,IAAI,EAAE,EAAE;CAC5D,CAAC,CAAC;AAEU,QAAA,UAAU,GAAkB,CAAC,gBAAQ,CAAC,CAAC;AACvC,QAAA,KAAK,GAAkB,CAAC,gBAAQ,EAAE,iBAAS,EAAE,oBAAY,CAAC,CAAC;AAE3D,QAAA,MAAM,GAA+B,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,gBAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;AAC5E,QAAA,aAAa,GAA+B,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,iBAAS,EAAE,KAAK,EAAE,cAAM,EAAE,EAAE,CAAC;AAC9F,QAAA,kBAAkB,GAA+B,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,oBAAY,EAAE,KAAK,EAAE,cAAM,EAAE,EAAE,CAAC;AACtG,QAAA,2BAA2B,GAA+B;IACnE,SAAS,EAAE,EAAE,IAAI,EAAE,oBAAY,EAAE,KAAK,EAAE,qBAAa,EAAE;CAC1D,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "graphql-form",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.6",
|
4
4
|
"description": "Easy form creation with GraphQL Editor and React",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"scripts": {
|
@@ -22,12 +22,11 @@
|
|
22
22
|
"author": "Aexol <aexol@aexol.com> (http://aexol.com)",
|
23
23
|
"license": "MIT",
|
24
24
|
"homepage": "https://form.graphqleditor.com",
|
25
|
-
"devDependencies": {},
|
26
25
|
"peerDependencies": {
|
27
26
|
"react": ">=18",
|
28
27
|
"react-dom": ">=18"
|
29
28
|
},
|
30
29
|
"dependencies": {
|
31
|
-
"graphql-js-tree": "^0.
|
30
|
+
"graphql-js-tree": "^0.2.5"
|
32
31
|
}
|
33
32
|
}
|
package/src/__tests__/consts.ts
CHANGED
@@ -1,33 +1,33 @@
|
|
1
1
|
import { FormObject } from '@/models';
|
2
|
-
import { Options, ParserField, TypeDefinition } from 'graphql-js-tree';
|
2
|
+
import { createParserField, Options, ParserField, TypeDefinition } from 'graphql-js-tree';
|
3
3
|
|
4
4
|
// Global Arrange
|
5
|
-
export const typeNode: ParserField = {
|
5
|
+
export const typeNode: ParserField = createParserField({
|
6
6
|
name: 'Type',
|
7
7
|
args: [],
|
8
8
|
data: { type: TypeDefinition.ObjectTypeDefinition },
|
9
9
|
directives: [],
|
10
10
|
interfaces: [],
|
11
11
|
type: { fieldType: { name: 'type', type: Options.name } },
|
12
|
-
};
|
12
|
+
});
|
13
13
|
|
14
|
-
export const inputNode: ParserField = {
|
14
|
+
export const inputNode: ParserField = createParserField({
|
15
15
|
name: 'Input',
|
16
16
|
args: [],
|
17
17
|
data: { type: TypeDefinition.InputObjectTypeDefinition },
|
18
18
|
directives: [],
|
19
19
|
interfaces: [],
|
20
20
|
type: { fieldType: { name: 'type', type: Options.name } },
|
21
|
-
};
|
21
|
+
});
|
22
22
|
|
23
|
-
export const nodeWithArgs: ParserField = {
|
23
|
+
export const nodeWithArgs: ParserField = createParserField({
|
24
24
|
name: 'Root',
|
25
25
|
args: [typeNode, inputNode],
|
26
26
|
data: { type: TypeDefinition.ObjectTypeDefinition },
|
27
27
|
directives: [],
|
28
28
|
interfaces: [],
|
29
29
|
type: { fieldType: { name: 'type', type: Options.name } },
|
30
|
-
};
|
30
|
+
});
|
31
31
|
|
32
32
|
export const singleNode: ParserField[] = [typeNode];
|
33
33
|
export const nodes: ParserField[] = [typeNode, inputNode, nodeWithArgs];
|