Skip to content

Commit 692bcbf

Browse files
authored
revert incremental delivery (#4534)
will need to fix abort and merge back incremental delivery
1 parent 431dc8b commit 692bcbf

46 files changed

Lines changed: 157 additions & 10102 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

integrationTests/node/index.cjs

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@
33
const assert = require('node:assert');
44
const { readFileSync } = require('node:fs');
55

6-
const {
7-
experimentalExecuteIncrementally,
8-
graphqlSync,
9-
parse,
10-
} = require('graphql');
11-
const { buildSchema } = require('graphql/utilities');
6+
const { graphqlSync } = require('graphql');
7+
const { astFromValue, buildSchema } = require('graphql/utilities');
128
const { version } = require('graphql/version');
139

1410
assert.deepStrictEqual(
@@ -18,7 +14,7 @@ assert.deepStrictEqual(
1814

1915
const schema = buildSchema('type Query { hello: String }');
2016

21-
let result = graphqlSync({
17+
const result = graphqlSync({
2218
schema,
2319
source: '{ hello }',
2420
rootValue: { hello: 'world' },
@@ -32,25 +28,9 @@ assert.deepStrictEqual(result, {
3228
});
3329

3430
/**
35-
* The below test triggers a call `invariant` method during execution (by
36-
* passing a negative number to the `initialCount` parameter on the `@stream`
37-
* directive). This ensures that the `inlineInvariant` method called by our
38-
* build script works correctly.
31+
* The below test triggers a call to the `invariant` utility (by passing
32+
* an invalid value to astFromValue). This ensures that the
33+
* `inlineInvariant` function called by our build script works correctly.
3934
**/
4035

41-
const experimentalSchema = buildSchema(`
42-
directive @stream(initialCount: Int!) on FIELD
43-
44-
type Query {
45-
greetings: [String]
46-
}
47-
`);
48-
49-
result = experimentalExecuteIncrementally({
50-
schema: experimentalSchema,
51-
document: parse('{ greetings @stream(initialCount: -1) }'),
52-
rootValue: { greetings: ['hi', 'hello'] },
53-
});
54-
55-
assert(result.errors?.[0] !== undefined);
56-
assert(!result.errors[0].message.includes('is not defined'));
36+
assert.throws(() => astFromValue(true, undefined), 'Unexpected input type: ');

integrationTests/node/index.mjs

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
import assert from 'node:assert';
22
import { readFileSync } from 'node:fs';
33

4-
import {
5-
experimentalExecuteIncrementally,
6-
graphqlSync,
7-
parse,
8-
} from 'graphql-esm';
9-
import { buildSchema } from 'graphql-esm/utilities';
4+
import { graphqlSync } from 'graphql-esm';
5+
import { astFromValue, buildSchema } from 'graphql-esm/utilities';
106
import { version } from 'graphql-esm/version';
117

128
assert.deepStrictEqual(
@@ -16,7 +12,7 @@ assert.deepStrictEqual(
1612

1713
const schema = buildSchema('type Query { hello: String }');
1814

19-
let result = graphqlSync({
15+
const result = graphqlSync({
2016
schema,
2117
source: '{ hello }',
2218
rootValue: { hello: 'world' },
@@ -29,26 +25,4 @@ assert.deepStrictEqual(result, {
2925
},
3026
});
3127

32-
/**
33-
* The below test triggers a call `invariant` method during execution (by
34-
* passing a negative number to the `initialCount` parameter on the `@stream`
35-
* directive). This ensures that the `inlineInvariant` method called by our
36-
* build script works correctly.
37-
**/
38-
39-
const experimentalSchema = buildSchema(`
40-
directive @stream(initialCount: Int!) on FIELD
41-
42-
type Query {
43-
greetings: [String]
44-
}
45-
`);
46-
47-
result = experimentalExecuteIncrementally({
48-
schema: experimentalSchema,
49-
document: parse('{ greetings @stream(initialCount: -1) }'),
50-
rootValue: { greetings: ['hi', 'hello'] },
51-
});
52-
53-
assert(result.errors?.[0] !== undefined);
54-
assert(!result.errors[0].message.includes('is not defined'));
28+
assert.throws(() => astFromValue(true, undefined), 'Unexpected input type: ');

0 commit comments

Comments
 (0)