graphql-tag 2.10.0 → 2.10.3

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/.editorconfig DELETED
@@ -1,7 +0,0 @@
1
- root = true
2
-
3
- [*.{js,json}]
4
- end_of_line = lf
5
- insert_final_newline = true
6
- indent_style = space
7
- indent_size = 2
package/.flowconfig DELETED
@@ -1,8 +0,0 @@
1
- [ignore]
2
-
3
- [include]
4
-
5
- [libs]
6
-
7
- [options]
8
- suppress_comment=\\(.\\|\n\\)*\\$FlowExpectError
@@ -1,18 +0,0 @@
1
-
2
-
3
- **Issue Labels**
4
-
5
- <!--
6
- While not necessary, you can help organize our issues by labeling this issue when you open it. To add a label automatically, simply [x] mark the appropriate box below:
7
- -->
8
-
9
- - [ ] has-reproduction
10
- - [ ] feature
11
- - [ ] docs
12
- - [ ] blocking
13
- - [ ] good first issue
14
-
15
- <!--
16
- You are also able to add labels by placing /label on a new line
17
- followed by the label you would like to add. ex: /label discussion
18
- -->
@@ -1,14 +0,0 @@
1
- **Pull Request Labels**
2
-
3
- <!--
4
- While not necessary, you can help organize our pull requests by labeling this pull request when you open it. To add a label automatically, simply [x] mark the appropriate box below:
5
- -->
6
-
7
- - [ ] feature
8
- - [ ] blocking
9
- - [ ] docs
10
-
11
- <!--
12
- You are also able to add labels by placing /label on a new line
13
- followed by the label you would like to add. ex: /label discussion
14
- -->
package/.tav.yml DELETED
@@ -1,10 +0,0 @@
1
-
2
- graphql-0.11:
3
- name: graphql
4
- versions: "^0.9.0 || ^0.10.0 || ^0.11.0"
5
- commands: mocha test/graphql.js test/graphql-v0.11.js
6
-
7
- graphql-0.12:
8
- name: graphql
9
- versions: "^0.12.0 || ^0.13.0"
10
- commands: mocha test/graphql.js test/graphql-v0.12.js
@@ -1,137 +0,0 @@
1
- const gqlRequire = require("../src");
2
- const gqlDefault = require("../src").default;
3
- const assert = require("chai").assert;
4
-
5
- [gqlRequire, gqlDefault].forEach((gql, i) => {
6
- describe(`gql ${i}`, () => {
7
- it("is correct for a simple query", () => {
8
- const ast = gql`
9
- {
10
- user(id: 5) {
11
- firstName
12
- lastName
13
- }
14
- }
15
- `;
16
-
17
- assert.equal(ast.kind, "Document");
18
- assert.deepEqual(ast.definitions, [
19
- {
20
- kind: "OperationDefinition",
21
- operation: "query",
22
- name: null,
23
- variableDefinitions: null,
24
- directives: [],
25
- selectionSet: {
26
- kind: "SelectionSet",
27
- selections: [
28
- {
29
- kind: "Field",
30
- alias: null,
31
- name: {
32
- kind: "Name",
33
- value: "user"
34
- },
35
- arguments: [
36
- {
37
- kind: "Argument",
38
- name: {
39
- kind: "Name",
40
- value: "id"
41
- },
42
- value: {
43
- kind: "IntValue",
44
- value: "5"
45
- }
46
- }
47
- ],
48
- directives: [],
49
- selectionSet: {
50
- kind: "SelectionSet",
51
- selections: [
52
- {
53
- kind: "Field",
54
- alias: null,
55
- name: {
56
- kind: "Name",
57
- value: "firstName"
58
- },
59
- arguments: [],
60
- directives: [],
61
- selectionSet: null
62
- },
63
- {
64
- kind: "Field",
65
- alias: null,
66
- name: {
67
- kind: "Name",
68
- value: "lastName"
69
- },
70
- arguments: [],
71
- directives: [],
72
- selectionSet: null
73
- }
74
- ]
75
- }
76
- }
77
- ]
78
- }
79
- }
80
- ]);
81
- });
82
- it("is correct for a fragment", () => {
83
- const ast = gql`
84
- fragment UserFragment on User {
85
- firstName
86
- lastName
87
- }
88
- `;
89
-
90
- assert.equal(ast.kind, "Document");
91
- assert.deepEqual(ast.definitions, [
92
- {
93
- kind: "FragmentDefinition",
94
- name: {
95
- kind: "Name",
96
- value: "UserFragment"
97
- },
98
- typeCondition: {
99
- kind: "NamedType",
100
- name: {
101
- kind: "Name",
102
- value: "User"
103
- }
104
- },
105
- directives: [],
106
- selectionSet: {
107
- kind: "SelectionSet",
108
- selections: [
109
- {
110
- kind: "Field",
111
- alias: null,
112
- name: {
113
- kind: "Name",
114
- value: "firstName"
115
- },
116
- arguments: [],
117
- directives: [],
118
- selectionSet: null
119
- },
120
- {
121
- kind: "Field",
122
- alias: null,
123
- name: {
124
- kind: "Name",
125
- value: "lastName"
126
- },
127
- arguments: [],
128
- directives: [],
129
- selectionSet: null
130
- }
131
- ]
132
- }
133
- }
134
- ]);
135
- });
136
- });
137
- });
@@ -1,138 +0,0 @@
1
- const gqlRequire = require("../src");
2
- const gqlDefault = require("../src").default;
3
- const assert = require("chai").assert;
4
-
5
- [gqlRequire, gqlDefault].forEach((gql, i) => {
6
- describe(`gql ${i}`, () => {
7
- it("is correct for a simple query", () => {
8
- const ast = gql`
9
- {
10
- user(id: 5) {
11
- firstName
12
- lastName
13
- }
14
- }
15
- `;
16
-
17
- assert.equal(ast.kind, "Document");
18
- assert.deepEqual(ast.definitions, [
19
- {
20
- kind: "OperationDefinition",
21
- operation: "query",
22
- name: undefined,
23
- variableDefinitions: [],
24
- directives: [],
25
- selectionSet: {
26
- kind: "SelectionSet",
27
- selections: [
28
- {
29
- kind: "Field",
30
- alias: undefined,
31
- name: {
32
- kind: "Name",
33
- value: "user"
34
- },
35
- arguments: [
36
- {
37
- kind: "Argument",
38
- name: {
39
- kind: "Name",
40
- value: "id"
41
- },
42
- value: {
43
- kind: "IntValue",
44
- value: "5"
45
- }
46
- }
47
- ],
48
- directives: [],
49
- selectionSet: {
50
- kind: "SelectionSet",
51
- selections: [
52
- {
53
- kind: "Field",
54
- alias: undefined,
55
- name: {
56
- kind: "Name",
57
- value: "firstName"
58
- },
59
- arguments: [],
60
- directives: [],
61
- selectionSet: undefined
62
- },
63
- {
64
- kind: "Field",
65
- alias: undefined,
66
- name: {
67
- kind: "Name",
68
- value: "lastName"
69
- },
70
- arguments: [],
71
- directives: [],
72
- selectionSet: undefined
73
- }
74
- ]
75
- }
76
- }
77
- ]
78
- }
79
- }
80
- ]);
81
- });
82
-
83
- it("is correct for a fragment", () => {
84
- const ast = gql`
85
- fragment UserFragment on User {
86
- firstName
87
- lastName
88
- }
89
- `;
90
-
91
- assert.equal(ast.kind, "Document");
92
- assert.deepEqual(ast.definitions, [
93
- {
94
- kind: "FragmentDefinition",
95
- name: {
96
- kind: "Name",
97
- value: "UserFragment"
98
- },
99
- typeCondition: {
100
- kind: "NamedType",
101
- name: {
102
- kind: "Name",
103
- value: "User"
104
- }
105
- },
106
- directives: [],
107
- selectionSet: {
108
- kind: "SelectionSet",
109
- selections: [
110
- {
111
- kind: "Field",
112
- alias: undefined,
113
- name: {
114
- kind: "Name",
115
- value: "firstName"
116
- },
117
- arguments: [],
118
- directives: [],
119
- selectionSet: undefined
120
- },
121
- {
122
- kind: "Field",
123
- alias: undefined,
124
- name: {
125
- kind: "Name",
126
- value: "lastName"
127
- },
128
- arguments: [],
129
- directives: [],
130
- selectionSet: undefined
131
- }
132
- ]
133
- }
134
- }
135
- ]);
136
- });
137
- });
138
- });