gql-ast 2.3.4 → 2.3.5
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/esm/index.js +29 -29
- package/index.d.ts +4 -4
- package/index.js +29 -29
- package/package.json +2 -2
package/esm/index.js
CHANGED
|
@@ -1,106 +1,106 @@
|
|
|
1
1
|
export const document = ({ definitions }) => ({
|
|
2
2
|
kind: 'Document',
|
|
3
|
-
definitions
|
|
3
|
+
definitions
|
|
4
4
|
});
|
|
5
|
-
export const operationDefinition = ({ operation, name, variableDefinitions = [], directives = [], selectionSet
|
|
5
|
+
export const operationDefinition = ({ operation, name, variableDefinitions = [], directives = [], selectionSet }) => ({
|
|
6
6
|
kind: 'OperationDefinition',
|
|
7
7
|
operation,
|
|
8
8
|
name: {
|
|
9
9
|
kind: 'Name',
|
|
10
|
-
value: name
|
|
10
|
+
value: name
|
|
11
11
|
},
|
|
12
12
|
variableDefinitions,
|
|
13
13
|
directives,
|
|
14
|
-
selectionSet
|
|
14
|
+
selectionSet
|
|
15
15
|
});
|
|
16
|
-
export const variableDefinition = ({ variable, type, directives
|
|
16
|
+
export const variableDefinition = ({ variable, type, directives }) => ({
|
|
17
17
|
kind: 'VariableDefinition',
|
|
18
18
|
variable,
|
|
19
19
|
type,
|
|
20
|
-
directives: directives || []
|
|
20
|
+
directives: directives || []
|
|
21
21
|
});
|
|
22
22
|
export const selectionSet = ({ selections }) => ({
|
|
23
23
|
kind: 'SelectionSet',
|
|
24
|
-
selections
|
|
24
|
+
selections
|
|
25
25
|
});
|
|
26
26
|
export const listType = ({ type }) => ({
|
|
27
27
|
kind: 'ListType',
|
|
28
|
-
type
|
|
28
|
+
type
|
|
29
29
|
});
|
|
30
30
|
export const nonNullType = ({ type }) => ({
|
|
31
31
|
kind: 'NonNullType',
|
|
32
|
-
type
|
|
32
|
+
type
|
|
33
33
|
});
|
|
34
34
|
export const namedType = ({ type }) => ({
|
|
35
35
|
kind: 'NamedType',
|
|
36
36
|
name: {
|
|
37
37
|
kind: 'Name',
|
|
38
|
-
value: type
|
|
39
|
-
}
|
|
38
|
+
value: type
|
|
39
|
+
}
|
|
40
40
|
});
|
|
41
41
|
export const variable = ({ name }) => ({
|
|
42
42
|
kind: 'Variable',
|
|
43
43
|
name: {
|
|
44
44
|
kind: 'Name',
|
|
45
|
-
value: name
|
|
46
|
-
}
|
|
45
|
+
value: name
|
|
46
|
+
}
|
|
47
47
|
});
|
|
48
48
|
export const objectValue = ({ fields }) => ({
|
|
49
49
|
kind: 'ObjectValue',
|
|
50
|
-
fields
|
|
50
|
+
fields
|
|
51
51
|
});
|
|
52
52
|
export const stringValue = ({ value }) => ({
|
|
53
53
|
kind: 'StringValue',
|
|
54
|
-
value
|
|
54
|
+
value
|
|
55
55
|
});
|
|
56
56
|
export const intValue = ({ value }) => ({
|
|
57
57
|
kind: 'IntValue',
|
|
58
|
-
value
|
|
58
|
+
value
|
|
59
59
|
});
|
|
60
60
|
export const booleanValue = ({ value }) => ({
|
|
61
61
|
kind: 'BooleanValue',
|
|
62
|
-
value
|
|
62
|
+
value
|
|
63
63
|
});
|
|
64
64
|
export const listValue = ({ values }) => ({
|
|
65
65
|
kind: 'ListValue',
|
|
66
|
-
values
|
|
66
|
+
values
|
|
67
67
|
});
|
|
68
68
|
export const nullValue = () => ({
|
|
69
|
-
kind: 'NullValue'
|
|
69
|
+
kind: 'NullValue'
|
|
70
70
|
});
|
|
71
|
-
export const fragmentDefinition = ({ name, typeCondition, directives = [], selectionSet
|
|
71
|
+
export const fragmentDefinition = ({ name, typeCondition, directives = [], selectionSet }) => ({
|
|
72
72
|
kind: 'FragmentDefinition',
|
|
73
73
|
name: {
|
|
74
74
|
kind: 'Name',
|
|
75
|
-
value: name
|
|
75
|
+
value: name
|
|
76
76
|
},
|
|
77
77
|
typeCondition,
|
|
78
78
|
directives,
|
|
79
|
-
selectionSet
|
|
79
|
+
selectionSet
|
|
80
80
|
});
|
|
81
81
|
export const objectField = ({ name, value }) => ({
|
|
82
82
|
kind: 'ObjectField',
|
|
83
83
|
name: {
|
|
84
84
|
kind: 'Name',
|
|
85
|
-
value: name
|
|
85
|
+
value: name
|
|
86
86
|
},
|
|
87
|
-
value
|
|
87
|
+
value
|
|
88
88
|
});
|
|
89
|
-
export const field = ({ name, args = [], directives = [], selectionSet
|
|
89
|
+
export const field = ({ name, args = [], directives = [], selectionSet }) => ({
|
|
90
90
|
kind: 'Field',
|
|
91
91
|
name: {
|
|
92
92
|
kind: 'Name',
|
|
93
|
-
value: name
|
|
93
|
+
value: name
|
|
94
94
|
},
|
|
95
95
|
arguments: args,
|
|
96
96
|
directives,
|
|
97
|
-
selectionSet
|
|
97
|
+
selectionSet
|
|
98
98
|
});
|
|
99
99
|
export const argument = ({ name, value }) => ({
|
|
100
100
|
kind: 'Argument',
|
|
101
101
|
name: {
|
|
102
102
|
kind: 'Name',
|
|
103
|
-
value: name
|
|
103
|
+
value: name
|
|
104
104
|
},
|
|
105
|
-
value
|
|
105
|
+
value
|
|
106
106
|
});
|
package/index.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ import { ArgumentNode, BooleanValueNode, DefinitionNode, DirectiveNode, Document
|
|
|
2
2
|
export declare const document: ({ definitions }: {
|
|
3
3
|
definitions: DefinitionNode[];
|
|
4
4
|
}) => DocumentNode;
|
|
5
|
-
export declare const operationDefinition: ({ operation, name, variableDefinitions, directives, selectionSet
|
|
5
|
+
export declare const operationDefinition: ({ operation, name, variableDefinitions, directives, selectionSet }: {
|
|
6
6
|
operation: OperationTypeNode;
|
|
7
7
|
name: string;
|
|
8
8
|
variableDefinitions?: VariableDefinitionNode[];
|
|
9
9
|
directives?: DirectiveNode[];
|
|
10
10
|
selectionSet: SelectionSetNode;
|
|
11
11
|
}) => OperationDefinitionNode;
|
|
12
|
-
export declare const variableDefinition: ({ variable, type, directives
|
|
12
|
+
export declare const variableDefinition: ({ variable, type, directives }: {
|
|
13
13
|
variable: VariableNode;
|
|
14
14
|
type: TypeNode;
|
|
15
15
|
directives?: DirectiveNode[];
|
|
@@ -45,7 +45,7 @@ export declare const listValue: ({ values }: {
|
|
|
45
45
|
values: any[];
|
|
46
46
|
}) => ListValueNode;
|
|
47
47
|
export declare const nullValue: () => NullValueNode;
|
|
48
|
-
export declare const fragmentDefinition: ({ name, typeCondition, directives, selectionSet
|
|
48
|
+
export declare const fragmentDefinition: ({ name, typeCondition, directives, selectionSet }: {
|
|
49
49
|
name: string;
|
|
50
50
|
typeCondition: NamedTypeNode;
|
|
51
51
|
directives?: DirectiveNode[];
|
|
@@ -55,7 +55,7 @@ export declare const objectField: ({ name, value }: {
|
|
|
55
55
|
name: string;
|
|
56
56
|
value: any;
|
|
57
57
|
}) => ObjectFieldNode;
|
|
58
|
-
export declare const field: ({ name, args, directives, selectionSet
|
|
58
|
+
export declare const field: ({ name, args, directives, selectionSet }: {
|
|
59
59
|
name: string;
|
|
60
60
|
args?: ArgumentNode[];
|
|
61
61
|
directives?: DirectiveNode[];
|
package/index.js
CHANGED
|
@@ -3,125 +3,125 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.argument = exports.field = exports.objectField = exports.fragmentDefinition = exports.nullValue = exports.listValue = exports.booleanValue = exports.intValue = exports.stringValue = exports.objectValue = exports.variable = exports.namedType = exports.nonNullType = exports.listType = exports.selectionSet = exports.variableDefinition = exports.operationDefinition = exports.document = void 0;
|
|
4
4
|
const document = ({ definitions }) => ({
|
|
5
5
|
kind: 'Document',
|
|
6
|
-
definitions
|
|
6
|
+
definitions
|
|
7
7
|
});
|
|
8
8
|
exports.document = document;
|
|
9
|
-
const operationDefinition = ({ operation, name, variableDefinitions = [], directives = [], selectionSet
|
|
9
|
+
const operationDefinition = ({ operation, name, variableDefinitions = [], directives = [], selectionSet }) => ({
|
|
10
10
|
kind: 'OperationDefinition',
|
|
11
11
|
operation,
|
|
12
12
|
name: {
|
|
13
13
|
kind: 'Name',
|
|
14
|
-
value: name
|
|
14
|
+
value: name
|
|
15
15
|
},
|
|
16
16
|
variableDefinitions,
|
|
17
17
|
directives,
|
|
18
|
-
selectionSet
|
|
18
|
+
selectionSet
|
|
19
19
|
});
|
|
20
20
|
exports.operationDefinition = operationDefinition;
|
|
21
|
-
const variableDefinition = ({ variable, type, directives
|
|
21
|
+
const variableDefinition = ({ variable, type, directives }) => ({
|
|
22
22
|
kind: 'VariableDefinition',
|
|
23
23
|
variable,
|
|
24
24
|
type,
|
|
25
|
-
directives: directives || []
|
|
25
|
+
directives: directives || []
|
|
26
26
|
});
|
|
27
27
|
exports.variableDefinition = variableDefinition;
|
|
28
28
|
const selectionSet = ({ selections }) => ({
|
|
29
29
|
kind: 'SelectionSet',
|
|
30
|
-
selections
|
|
30
|
+
selections
|
|
31
31
|
});
|
|
32
32
|
exports.selectionSet = selectionSet;
|
|
33
33
|
const listType = ({ type }) => ({
|
|
34
34
|
kind: 'ListType',
|
|
35
|
-
type
|
|
35
|
+
type
|
|
36
36
|
});
|
|
37
37
|
exports.listType = listType;
|
|
38
38
|
const nonNullType = ({ type }) => ({
|
|
39
39
|
kind: 'NonNullType',
|
|
40
|
-
type
|
|
40
|
+
type
|
|
41
41
|
});
|
|
42
42
|
exports.nonNullType = nonNullType;
|
|
43
43
|
const namedType = ({ type }) => ({
|
|
44
44
|
kind: 'NamedType',
|
|
45
45
|
name: {
|
|
46
46
|
kind: 'Name',
|
|
47
|
-
value: type
|
|
48
|
-
}
|
|
47
|
+
value: type
|
|
48
|
+
}
|
|
49
49
|
});
|
|
50
50
|
exports.namedType = namedType;
|
|
51
51
|
const variable = ({ name }) => ({
|
|
52
52
|
kind: 'Variable',
|
|
53
53
|
name: {
|
|
54
54
|
kind: 'Name',
|
|
55
|
-
value: name
|
|
56
|
-
}
|
|
55
|
+
value: name
|
|
56
|
+
}
|
|
57
57
|
});
|
|
58
58
|
exports.variable = variable;
|
|
59
59
|
const objectValue = ({ fields }) => ({
|
|
60
60
|
kind: 'ObjectValue',
|
|
61
|
-
fields
|
|
61
|
+
fields
|
|
62
62
|
});
|
|
63
63
|
exports.objectValue = objectValue;
|
|
64
64
|
const stringValue = ({ value }) => ({
|
|
65
65
|
kind: 'StringValue',
|
|
66
|
-
value
|
|
66
|
+
value
|
|
67
67
|
});
|
|
68
68
|
exports.stringValue = stringValue;
|
|
69
69
|
const intValue = ({ value }) => ({
|
|
70
70
|
kind: 'IntValue',
|
|
71
|
-
value
|
|
71
|
+
value
|
|
72
72
|
});
|
|
73
73
|
exports.intValue = intValue;
|
|
74
74
|
const booleanValue = ({ value }) => ({
|
|
75
75
|
kind: 'BooleanValue',
|
|
76
|
-
value
|
|
76
|
+
value
|
|
77
77
|
});
|
|
78
78
|
exports.booleanValue = booleanValue;
|
|
79
79
|
const listValue = ({ values }) => ({
|
|
80
80
|
kind: 'ListValue',
|
|
81
|
-
values
|
|
81
|
+
values
|
|
82
82
|
});
|
|
83
83
|
exports.listValue = listValue;
|
|
84
84
|
const nullValue = () => ({
|
|
85
|
-
kind: 'NullValue'
|
|
85
|
+
kind: 'NullValue'
|
|
86
86
|
});
|
|
87
87
|
exports.nullValue = nullValue;
|
|
88
|
-
const fragmentDefinition = ({ name, typeCondition, directives = [], selectionSet
|
|
88
|
+
const fragmentDefinition = ({ name, typeCondition, directives = [], selectionSet }) => ({
|
|
89
89
|
kind: 'FragmentDefinition',
|
|
90
90
|
name: {
|
|
91
91
|
kind: 'Name',
|
|
92
|
-
value: name
|
|
92
|
+
value: name
|
|
93
93
|
},
|
|
94
94
|
typeCondition,
|
|
95
95
|
directives,
|
|
96
|
-
selectionSet
|
|
96
|
+
selectionSet
|
|
97
97
|
});
|
|
98
98
|
exports.fragmentDefinition = fragmentDefinition;
|
|
99
99
|
const objectField = ({ name, value }) => ({
|
|
100
100
|
kind: 'ObjectField',
|
|
101
101
|
name: {
|
|
102
102
|
kind: 'Name',
|
|
103
|
-
value: name
|
|
103
|
+
value: name
|
|
104
104
|
},
|
|
105
|
-
value
|
|
105
|
+
value
|
|
106
106
|
});
|
|
107
107
|
exports.objectField = objectField;
|
|
108
|
-
const field = ({ name, args = [], directives = [], selectionSet
|
|
108
|
+
const field = ({ name, args = [], directives = [], selectionSet }) => ({
|
|
109
109
|
kind: 'Field',
|
|
110
110
|
name: {
|
|
111
111
|
kind: 'Name',
|
|
112
|
-
value: name
|
|
112
|
+
value: name
|
|
113
113
|
},
|
|
114
114
|
arguments: args,
|
|
115
115
|
directives,
|
|
116
|
-
selectionSet
|
|
116
|
+
selectionSet
|
|
117
117
|
});
|
|
118
118
|
exports.field = field;
|
|
119
119
|
const argument = ({ name, value }) => ({
|
|
120
120
|
kind: 'Argument',
|
|
121
121
|
name: {
|
|
122
122
|
kind: 'Name',
|
|
123
|
-
value: name
|
|
123
|
+
value: name
|
|
124
124
|
},
|
|
125
|
-
value
|
|
125
|
+
value
|
|
126
126
|
});
|
|
127
127
|
exports.argument = argument;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gql-ast",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.5",
|
|
4
4
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
5
5
|
"description": "GraphQL ASTs",
|
|
6
6
|
"main": "index.js",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"launchql",
|
|
40
40
|
"schema"
|
|
41
41
|
],
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "2bc45c48444fc9c2cce9f082cf33d533915bb048"
|
|
43
43
|
}
|