Skip to content

Commit 6c4bad4

Browse files
authored
[e2e] - use @whatwg-node/fetch (#7441)
* [e2e] - use `@whatwg-node/fetch` * Cleaner logs in CI * Use whatwg-node in integration test * Improvements * Go
1 parent 757de5d commit 6c4bad4

File tree

17 files changed

+331
-291
lines changed

17 files changed

+331
-291
lines changed
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`should compose 1`] = `
4+
"
5+
schema
6+
@link(url: "https://specs.apollo.dev/link/v1.0")
7+
@link(url: "https://specs.apollo.dev/join/v0.3", for: EXECUTION)
8+
9+
10+
11+
12+
13+
14+
{
15+
query: Query
16+
17+
18+
}
19+
20+
21+
directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE
22+
23+
directive @join__field(
24+
graph: join__Graph
25+
requires: join__FieldSet
26+
provides: join__FieldSet
27+
type: String
28+
external: Boolean
29+
override: String
30+
usedOverridden: Boolean
31+
) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION
32+
33+
directive @join__graph(name: String!, url: String!) on ENUM_VALUE
34+
35+
directive @join__implements(
36+
graph: join__Graph!
37+
interface: String!
38+
) repeatable on OBJECT | INTERFACE
39+
40+
directive @join__type(
41+
graph: join__Graph!
42+
key: join__FieldSet
43+
extension: Boolean! = false
44+
resolvable: Boolean! = true
45+
isInterfaceObject: Boolean! = false
46+
) repeatable on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR
47+
48+
directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION
49+
50+
scalar join__FieldSet
51+
52+
53+
directive @link(
54+
url: String
55+
as: String
56+
for: link__Purpose
57+
import: [link__Import]
58+
) repeatable on SCHEMA
59+
60+
scalar link__Import
61+
62+
enum link__Purpose {
63+
"""
64+
\`SECURITY\` features provide metadata necessary to securely resolve fields.
65+
"""
66+
SECURITY
67+
68+
"""
69+
\`EXECUTION\` features provide metadata necessary for operation execution.
70+
"""
71+
EXECUTION
72+
}
73+
74+
75+
76+
77+
78+
79+
80+
enum join__Graph {
81+
HELLOWORLD @join__graph(name: "helloworld", url: "")
82+
}
83+
84+
type Query @join__type(graph: HELLOWORLD) {
85+
hello: String
86+
}
87+
88+
"
89+
`;
Lines changed: 2 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { createTenv } from '@e2e/tenv';
2+
import { fetch } from '@whatwg-node/fetch';
23

34
const { serve, compose } = createTenv(__dirname);
45

@@ -10,91 +11,5 @@ it('should serve', async () => {
1011

1112
it('should compose', async () => {
1213
const proc = await compose();
13-
expect(proc.result).toMatchInlineSnapshot(`
14-
"
15-
schema
16-
@link(url: "https://specs.apollo.dev/link/v1.0")
17-
@link(url: "https://specs.apollo.dev/join/v0.3", for: EXECUTION)
18-
19-
20-
21-
22-
23-
24-
{
25-
query: Query
26-
27-
28-
}
29-
30-
31-
directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE
32-
33-
directive @join__field(
34-
graph: join__Graph
35-
requires: join__FieldSet
36-
provides: join__FieldSet
37-
type: String
38-
external: Boolean
39-
override: String
40-
usedOverridden: Boolean
41-
) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION
42-
43-
directive @join__graph(name: String!, url: String!) on ENUM_VALUE
44-
45-
directive @join__implements(
46-
graph: join__Graph!
47-
interface: String!
48-
) repeatable on OBJECT | INTERFACE
49-
50-
directive @join__type(
51-
graph: join__Graph!
52-
key: join__FieldSet
53-
extension: Boolean! = false
54-
resolvable: Boolean! = true
55-
isInterfaceObject: Boolean! = false
56-
) repeatable on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR
57-
58-
directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION
59-
60-
scalar join__FieldSet
61-
62-
63-
directive @link(
64-
url: String
65-
as: String
66-
for: link__Purpose
67-
import: [link__Import]
68-
) repeatable on SCHEMA
69-
70-
scalar link__Import
71-
72-
enum link__Purpose {
73-
"""
74-
\`SECURITY\` features provide metadata necessary to securely resolve fields.
75-
"""
76-
SECURITY
77-
78-
"""
79-
\`EXECUTION\` features provide metadata necessary for operation execution.
80-
"""
81-
EXECUTION
82-
}
83-
84-
85-
86-
87-
88-
89-
90-
enum join__Graph {
91-
HELLOWORLD @join__graph(name: "helloworld", url: "")
92-
}
93-
94-
type Query @join__type(graph: HELLOWORLD) {
95-
hello: String
96-
}
97-
98-
"
99-
`);
14+
expect(proc.result).toMatchSnapshot();
10015
});
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`should compose 1`] = `
4+
"
5+
schema
6+
@link(url: "https://specs.apollo.dev/link/v1.0")
7+
@link(url: "https://specs.apollo.dev/join/v0.3", for: EXECUTION)
8+
9+
10+
11+
12+
13+
14+
{
15+
query: Query
16+
17+
18+
}
19+
20+
21+
directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE
22+
23+
directive @join__field(
24+
graph: join__Graph
25+
requires: join__FieldSet
26+
provides: join__FieldSet
27+
type: String
28+
external: Boolean
29+
override: String
30+
usedOverridden: Boolean
31+
) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION
32+
33+
directive @join__graph(name: String!, url: String!) on ENUM_VALUE
34+
35+
directive @join__implements(
36+
graph: join__Graph!
37+
interface: String!
38+
) repeatable on OBJECT | INTERFACE
39+
40+
directive @join__type(
41+
graph: join__Graph!
42+
key: join__FieldSet
43+
extension: Boolean! = false
44+
resolvable: Boolean! = true
45+
isInterfaceObject: Boolean! = false
46+
) repeatable on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR
47+
48+
directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION
49+
50+
scalar join__FieldSet
51+
52+
53+
directive @link(
54+
url: String
55+
as: String
56+
for: link__Purpose
57+
import: [link__Import]
58+
) repeatable on SCHEMA
59+
60+
scalar link__Import
61+
62+
enum link__Purpose {
63+
"""
64+
\`SECURITY\` features provide metadata necessary to securely resolve fields.
65+
"""
66+
SECURITY
67+
68+
"""
69+
\`EXECUTION\` features provide metadata necessary for operation execution.
70+
"""
71+
EXECUTION
72+
}
73+
74+
75+
76+
77+
78+
79+
80+
enum join__Graph {
81+
HELLOWORLD @join__graph(name: "helloworld", url: "")
82+
}
83+
84+
type Query @join__type(graph: HELLOWORLD) {
85+
hello: String
86+
}
87+
88+
"
89+
`;
Lines changed: 2 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { createTenv } from '@e2e/tenv';
2+
import { fetch } from '@whatwg-node/fetch';
23

34
const { serve, compose } = createTenv(__dirname);
45

@@ -10,91 +11,5 @@ it('should serve', async () => {
1011

1112
it('should compose', async () => {
1213
const proc = await compose();
13-
expect(proc.result).toMatchInlineSnapshot(`
14-
"
15-
schema
16-
@link(url: "https://specs.apollo.dev/link/v1.0")
17-
@link(url: "https://specs.apollo.dev/join/v0.3", for: EXECUTION)
18-
19-
20-
21-
22-
23-
24-
{
25-
query: Query
26-
27-
28-
}
29-
30-
31-
directive @join__enumValue(graph: join__Graph!) repeatable on ENUM_VALUE
32-
33-
directive @join__field(
34-
graph: join__Graph
35-
requires: join__FieldSet
36-
provides: join__FieldSet
37-
type: String
38-
external: Boolean
39-
override: String
40-
usedOverridden: Boolean
41-
) repeatable on FIELD_DEFINITION | INPUT_FIELD_DEFINITION
42-
43-
directive @join__graph(name: String!, url: String!) on ENUM_VALUE
44-
45-
directive @join__implements(
46-
graph: join__Graph!
47-
interface: String!
48-
) repeatable on OBJECT | INTERFACE
49-
50-
directive @join__type(
51-
graph: join__Graph!
52-
key: join__FieldSet
53-
extension: Boolean! = false
54-
resolvable: Boolean! = true
55-
isInterfaceObject: Boolean! = false
56-
) repeatable on OBJECT | INTERFACE | UNION | ENUM | INPUT_OBJECT | SCALAR
57-
58-
directive @join__unionMember(graph: join__Graph!, member: String!) repeatable on UNION
59-
60-
scalar join__FieldSet
61-
62-
63-
directive @link(
64-
url: String
65-
as: String
66-
for: link__Purpose
67-
import: [link__Import]
68-
) repeatable on SCHEMA
69-
70-
scalar link__Import
71-
72-
enum link__Purpose {
73-
"""
74-
\`SECURITY\` features provide metadata necessary to securely resolve fields.
75-
"""
76-
SECURITY
77-
78-
"""
79-
\`EXECUTION\` features provide metadata necessary for operation execution.
80-
"""
81-
EXECUTION
82-
}
83-
84-
85-
86-
87-
88-
89-
90-
enum join__Graph {
91-
HELLOWORLD @join__graph(name: "helloworld", url: "")
92-
}
93-
94-
type Query @join__type(graph: HELLOWORLD) {
95-
hello: String
96-
}
97-
98-
"
99-
`);
14+
expect(proc.result).toMatchSnapshot();
10015
});

0 commit comments

Comments
 (0)