Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incremental Delivery Suggestions #154

Closed
wants to merge 204 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
6103489
initial commit
yaacovCR Oct 12, 2021
579be14
add TODO to deprecate getOperationRootType
yaacovCR Oct 12, 2021
8a49bb1
remove use of checkgit script until can make multiplatform
yaacovCR Oct 12, 2021
bb58ab5
add gitattributes for line ending standardization
yaacovCR Oct 12, 2021
687eaf8
change cspell args for windows compatibility
yaacovCR Oct 12, 2021
18240e7
0.0.2
yaacovCR Oct 12, 2021
c352976
Merge remote-tracking branch 'upstream/main'
yaacovCR Oct 12, 2021
6a0a2d3
bring back checkgit script
yaacovCR Oct 12, 2021
781e8b1
upgrade to latest rc
yaacovCR Oct 12, 2021
7ed0895
fix lockfile
yaacovCR Oct 12, 2021
0e8609d
remove unused test funcs from upstream
yaacovCR Oct 12, 2021
d6eab2e
remove untested branch
yaacovCR Oct 12, 2021
154787e
Merge remote-tracking branch 'upstream/main'
yaacovCR Oct 13, 2021
d008c8d
Properly name the root field execution functions (#1)
yaacovCR Oct 13, 2021
76b46ee
remove unused files
yaacovCR Oct 13, 2021
540453a
update package.json
yaacovCR Oct 13, 2021
ab3a5aa
provide better fix for broken OperationTypeNode
yaacovCR Oct 13, 2021
c692a1d
Subscriptions should normalize requests only once
yaacovCR Oct 7, 2021
02029d7
Move call site for assertValidExecutionArguments (#3)
yaacovCR Oct 14, 2021
b42d472
Correct comment for buildExecutionContext return type. (#4)
yaacovCR Oct 14, 2021
ada80ac
Move subscription implemention alongside execution (#5)
yaacovCR Oct 14, 2021
836a52e
Move executor implementation to separate file (#6)
yaacovCR Oct 14, 2021
c613137
Refactor Executor as class (#7)
yaacovCR Oct 14, 2021
3e00326
Export the Executor class for customization (#8)
yaacovCR Oct 14, 2021
8bdcf7e
0.0.3
yaacovCR Oct 14, 2021
b3b4a59
Add v15 to ci (#9)
yaacovCR Oct 16, 2021
4525624
Remove unnecessary benchmarks (#11)
yaacovCR Oct 16, 2021
df8898a
Correct README (#12)
yaacovCR Oct 16, 2021
0eeb3ca
Add changesets for release management (#13)
yaacovCR Oct 17, 2021
92d1428
Try to fix changesets (#14)
yaacovCR Oct 17, 2021
f1def23
Further fixes for changesets (#15)
yaacovCR Oct 17, 2021
73d7500
Version Packages (#16)
github-actions[bot] Oct 17, 2021
4a83218
Further fixes for changesets (#17)
yaacovCR Oct 18, 2021
08f8cd2
Version Packages (#18)
github-actions[bot] Oct 18, 2021
8016954
Further fixes for changesets (#19)
yaacovCR Oct 18, 2021
08fd49b
Version Packages (#20)
github-actions[bot] Oct 18, 2021
f0a6cdf
Fix lockfile (#22)
yaacovCR Oct 18, 2021
604d928
Re-export execution functions (#21)
yaacovCR Oct 18, 2021
be76941
Version Packages (#23)
github-actions[bot] Oct 18, 2021
c5a1eb2
Fix secret name for gitpublish (#24)
yaacovCR Oct 18, 2021
b09de6b
temporarily remote error suppression (#25)
yaacovCR Oct 18, 2021
8bb7710
Try to fix use of GITHUB_TOKEN (#26)
yaacovCR Oct 18, 2021
cf1b779
try to scope GITHUB_TOKEN to username (#27)
yaacovCR Oct 18, 2021
43314cf
fix script comment (#28)
yaacovCR Oct 18, 2021
ae50fc0
Use GITHUB_ACTOR environment variable in workflow (#29)
yaacovCR Oct 18, 2021
43faf00
Merge latest graphql through 16.0.0-rc.5 (#30)
yaacovCR Oct 19, 2021
29b0498
Version Packages (#31)
github-actions[bot] Oct 19, 2021
56b0f5d
Proofread README (#32)
yaacovCR Oct 19, 2021
6188539
Avoid Promise.all (#33)
yaacovCR Oct 22, 2021
4e571e7
Switch graphql-js to peer dependency (#36)
yaacovCR Oct 22, 2021
31e6458
Version Packages (#34)
github-actions[bot] Oct 22, 2021
8ad6a6c
Async benchmarks (#37)
yaacovCR Oct 25, 2021
8df89b5
Allow list field resolvers to return async iterables (#38)
yaacovCR Oct 26, 2021
e36d164
Version Packages (#39)
github-actions[bot] Oct 26, 2021
5dd52c5
Refactor: introduce completeListItemValue (#40)
yaacovCR Oct 26, 2021
f6d0b73
Support incremental delivery with defer/stream (#41)
yaacovCR Oct 29, 2021
1ae20eb
Update execute call signature (#44)
yaacovCR Oct 31, 2021
7aaffa2
BREAKING CHANGE: consolidate `execute` and `subscribe` functions (#45)
yaacovCR Oct 31, 2021
6b5d57b
Refactor executeQueryOrMutationImpl (#46)
yaacovCR Oct 31, 2021
14742f6
refactor: introduce executePatches method (#47)
yaacovCR Nov 1, 2021
86d396e
refactor: introduce parseOperationRoot method (#48)
yaacovCR Nov 1, 2021
b4e5dc0
add additional methods hooks (#49)
yaacovCR Nov 1, 2021
ecfd106
introduce resolveField fn (#43)
yaacovCR Nov 1, 2021
9e9653f
Update dependencies (#50)
yaacovCR Nov 1, 2021
34a334a
Merge remote-tracking branch 'upstream/main' into merge
yaacovCR Nov 1, 2021
59f9096
Merge pull request #51 from yaacovCR/merge
yaacovCR Nov 1, 2021
0a5fce1
remove upstream integration tests (#52)
yaacovCR Nov 1, 2021
a1c6a81
Add repeaters for internal use when creating async generators (#53)
yaacovCR Nov 4, 2021
4957736
move expectPromise into testUtils (#55)
yaacovCR Nov 9, 2021
733d264
improve expect-promise (#57)
yaacovCR Nov 9, 2021
1a5ee17
use expectPromise utility for more tests (#58)
yaacovCR Nov 9, 2021
e493af7
throw proper errors (#59)
yaacovCR Nov 9, 2021
0945e97
use expectPromise when throwing over 1 (#60)
yaacovCR Nov 9, 2021
6bb42ab
replace mapAsyncIterator with repeater implementation (#56)
yaacovCR Nov 10, 2021
5014a70
Rename mapAsyncIterator to mapAsyncIterable (#61)
yaacovCR Nov 10, 2021
3bd508d
implement flattenAsyncIterator with a repeater (#62)
yaacovCR Nov 11, 2021
430ac18
clean up flattenAsyncIterator tests (#64)
yaacovCR Nov 11, 2021
3c1407f
Align map and flatten transducers (#63)
yaacovCR Nov 11, 2021
7eb711d
use expectPromise within flattenAsyncIterator tests (#65)
yaacovCR Nov 11, 2021
628b348
rename flattenAsyncIterator (#66)
yaacovCR Nov 11, 2021
83d36aa
reduce delay within tests (#67)
yaacovCR Nov 11, 2021
39e178b
fix-execute-patches (#69)
yaacovCR Nov 13, 2021
f08f6c9
introduce completeIteratorValue and addIteratorValue (#70)
yaacovCR Nov 14, 2021
585b594
standardize iterator and async iterator methods (#71)
yaacovCR Nov 14, 2021
a74a8fc
fix types (#68)
yaacovCR Nov 14, 2021
b448669
introduce addPatches (#72)
yaacovCR Nov 14, 2021
4ef508b
go back to processing async iterator results in parallel (#73)
yaacovCR Nov 16, 2021
063cb73
implement incremental delivery with repeaters (#74)
yaacovCR Nov 16, 2021
9a94896
add additional guard and test (#76)
yaacovCR Nov 16, 2021
7332de9
tweak instruction processing (#75)
yaacovCR Nov 16, 2021
2ec37d6
streamline pushPatchResult (#77)
yaacovCR Nov 16, 2021
4953458
remove unnecessary while loop (#78)
yaacovCR Nov 16, 2021
9eb0fda
narrow Push type (#80)
yaacovCR Nov 16, 2021
a0c1809
process additional instructions as soon as possible (#81)
yaacovCR Nov 17, 2021
740ec52
skip instruction processing when current payload is null (#83)
yaacovCR Nov 19, 2021
371223f
support async benchmark tests
robrichard Oct 4, 2020
a55916f
Add benchmarks for sync and async list fields
robrichard May 26, 2021
787c625
Support returning async iterables from resolver functions
robrichard Nov 14, 2021
971ce43
add benchmark tests for async iterable list fields
robrichard Oct 4, 2020
ba0efdd
Add @defer directive to specified directives
lilianammmatos Feb 9, 2021
8e98b94
Implement support for @defer directive
lilianammmatos Nov 15, 2021
edb5617
Add @stream directive to specified directives
robrichard Oct 27, 2021
519909f
Implement support for @stream directive
robrichard Nov 20, 2021
27f4d64
add defer/stream support for subscriptions (#7)
robrichard Nov 15, 2021
5455571
Return underlying AsyncIterators when execute result is returned (#2843)
robrichard Nov 15, 2021
fb1b2aa
fix(race): concurrent next calls with defer/stream (#2975)
robrichard Nov 20, 2021
c9bfc7c
revert initial repeater implementation (#84)
yaacovCR Nov 22, 2021
79440e6
re-implement incremental delivery with repeaters (#85)
yaacovCR Nov 22, 2021
f8a5ac1
add additional guard and test (#86)
yaacovCR Nov 22, 2021
6f426de
avoid recursion (#87)
yaacovCR Nov 22, 2021
9c40055
use set for iterators collection (#88)
yaacovCR Nov 22, 2021
e72d187
fix return type for buildResponse (#89)
yaacovCR Nov 22, 2021
70c8274
reorganize ExecutionContext types
yaacovCR Nov 22, 2021
f3aa8f8
Merge remote-tracking branch 'upstream/main' into merge
yaacovCR Nov 23, 2021
82f017d
Merge pull request #91 from yaacovCR/merge
yaacovCR Nov 23, 2021
6eaf898
Merge remote-tracking branch 'upstream/defer-stream'
yaacovCR Nov 23, 2021
8beb742
run prettier
yaacovCR Nov 23, 2021
923a01e
Merge pull request #92 from yaacovCR/merge-latest-defer-stream
yaacovCR Nov 23, 2021
fa437c1
Merge pull request #90 from yaacovCR/rename-dispatcher-result
yaacovCR Nov 23, 2021
3af9734
maintain payload order (#93)
yaacovCR Nov 23, 2021
6ddbf58
Downgrade next release to patch version (#94)
yaacovCR Nov 23, 2021
f9ce865
memoize getArgumentValues (#95)
yaacovCR Nov 23, 2021
797ee21
memoize field node lists when collecting fields (#96)
yaacovCR Nov 24, 2021
2d12b92
update docs (#97)
yaacovCR Nov 24, 2021
73752a4
Version Packages (#42)
github-actions[bot] Nov 24, 2021
5a9c3be
Update README (#98)
yaacovCR Nov 24, 2021
fc44412
Version Packages (#99)
github-actions[bot] Nov 24, 2021
b9feee7
Update CHANGELOG (#100)
yaacovCR Nov 24, 2021
d5bb5e4
use correct executeSync (#102)
yaacovCR Dec 2, 2021
719ef94
move guard to appropriate location (#103)
yaacovCR Dec 5, 2021
62d68bf
merge latest upstream changes (#104)
yaacovCR Dec 6, 2021
1ee70a1
use WeakMap for pending payloads (#106)
yaacovCR Dec 7, 2021
d3016ce
remove unnecessary method (#107)
yaacovCR Dec 7, 2021
8f9fef6
Merge remote-tracking branch 'upstream/main' into merge-again
yaacovCR Dec 7, 2021
5651554
merge upstream (again)
yaacovCR Dec 7, 2021
38e7235
merge latest defer-stream
yaacovCR Dec 7, 2021
419af3a
prettier
yaacovCR Dec 7, 2021
29af055
merge latest defer-stream (#109)
yaacovCR Dec 7, 2021
c598a40
add changeset for recent upstream merge (#110)
yaacovCR Dec 7, 2021
ec1505a
Version Packages (#111)
github-actions[bot] Dec 7, 2021
d06133c
Do not validate schema on first execution (#112)
yaacovCR Dec 15, 2021
ecc3758
Allow cross-realm execution (#114)
yaacovCR Dec 17, 2021
d5a1b24
import local isAbstractType (#116)
yaacovCR Dec 18, 2021
d93aa9a
add v14 support (#115)
yaacovCR Dec 18, 2021
51a7b2a
Merge remote-tracking branch 'upstream/main' into merge
yaacovCR Dec 20, 2021
783dbe1
run npm dedupe
yaacovCR Dec 20, 2021
8d95207
remove deletion of publishConfig in build script
yaacovCR Dec 20, 2021
3132731
merge latest upstream 16.2.0
yaacovCR Dec 20, 2021
0b6363a
allow type resolution with GraphQLObjectTypes (#117)
yaacovCR Dec 20, 2021
d977646
Merge remote-tracking branch 'upstream/main'
yaacovCR Dec 29, 2021
edcbb22
fix lockfile
yaacovCR Dec 29, 2021
0c177ce
Merge latest upstream (#120)
yaacovCR Dec 29, 2021
8e25e2d
Do not expose new predicates (#121)
yaacovCR Dec 29, 2021
8d0f84c
Complete #112 (#122)
yaacovCR Dec 29, 2021
8a73e69
Prune type overrides (#123)
yaacovCR Dec 29, 2021
ac0430a
remove createSourceEventStream function export (#124)
yaacovCR Jan 4, 2022
832b8af
introduce ExecutorSchema (#119)
yaacovCR Jan 4, 2022
f4c8fe8
Version Packages (#113)
github-actions[bot] Jan 4, 2022
641872e
refactor toExecutorSchema (#125)
yaacovCR Jan 5, 2022
6151cdb
add all possible input types to ExecutorSchema (#126)
yaacovCR Jan 5, 2022
feb7888
Version Packages (#127)
github-actions[bot] Jan 5, 2022
0111863
fix ExecutorSchema isNullType (#128)
yaacovCR Jan 6, 2022
9f6a142
Version Packages (#129)
github-actions[bot] Jan 6, 2022
6b97308
refactor addition of all possible input types (#131)
yaacovCR Jan 14, 2022
672a743
use enableIncremental instead of disableIncremental (#133)
yaacovCR Jan 14, 2022
6bb154a
add memoization around fieldNodes (#130)
yaacovCR Jan 14, 2022
7436203
Version Packages (#132)
github-actions[bot] Jan 15, 2022
1ec0b83
move collectFields into executor (#134)
yaacovCR Jan 18, 2022
d856451
use enableIncremental flag to create custom getDeferValues method (#136)
yaacovCR Jan 23, 2022
2d4da9b
introduce OperationContext (#137)
yaacovCR Jan 24, 2022
43a41fb
retire memoize3 (#138)
yaacovCR Jan 25, 2022
d7681d2
remove unnecessary underscores (#140)
yaacovCR Jan 26, 2022
2b246c2
clarify nomenclature around the root (#139)
yaacovCR Jan 26, 2022
353a192
introduce value completers (#141)
yaacovCR Jan 26, 2022
28efebe
introduce FieldContext (#142)
yaacovCR Jan 27, 2022
2a1621c
add changeset for refactoring (#143)
yaacovCR Jan 27, 2022
db83cc1
Version Packages (#144)
github-actions[bot] Jan 27, 2022
53a698e
preserve key response order (#145)
yaacovCR Jan 27, 2022
71fdf54
Version Packages (#146)
github-actions[bot] Jan 27, 2022
84c98f3
minor referencing cleanup (#147)
yaacovCR Jan 28, 2022
86eb6af
introduce handleRawError method (#148)
yaacovCR Jan 29, 2022
a1d3d36
fix inadvertent revert of #147 (#149)
yaacovCR Jan 29, 2022
9f6d76a
integrate executeSubscriptionImpl and executeQueryOrMutationImpl (#150)
yaacovCR Feb 3, 2022
7e6f18d
refactor methods (#151)
yaacovCR Feb 3, 2022
3a84284
add changeset for release (#152)
yaacovCR Feb 4, 2022
f5527ff
Version Packages (#153)
github-actions[bot] Feb 4, 2022
9291906
separate stream and non-stream execution (#155)
yaacovCR Feb 6, 2022
e5b7cc7
extract publisher from executor (#156)
yaacovCR Feb 24, 2022
3083c1d
allow constant conditions for loops (#157)
yaacovCR Mar 2, 2022
c749991
revisit fragments if visited initially with defer (#158)
yaacovCR Mar 4, 2022
ab64eec
Version Packages (#159)
github-actions[bot] Mar 4, 2022
6b06772
introduce experimental parallel streaming (#160)
yaacovCR Mar 18, 2022
99a85d4
introduce experimental batched streaming (#162)
yaacovCR Mar 18, 2022
5d09ec8
limit when `data` property is an array (#163)
yaacovCR Mar 20, 2022
b05f163
Update thin-maps-boil.md (#164)
yaacovCR Mar 20, 2022
f390fd0
Version Packages (#161)
github-actions[bot] Mar 20, 2022
83d9258
fix batched parallel stream error with defer (#165)
yaacovCR Mar 21, 2022
0f67733
Version Packages (#166)
github-actions[bot] Mar 21, 2022
6dc55f5
refactor: introduce createBundler helper (#167)
yaacovCR Mar 21, 2022
3f4d149
refactor: move execution utils to execution folder (#168)
yaacovCR Mar 21, 2022
223e19d
trim unused class member (#169)
yaacovCR Mar 21, 2022
fd9763b
streamed data should always be wrapped in an array
yaacovCR Mar 21, 2022
fd7d938
resolvers for list fields should return AsyncIterables of Iterables
yaacovCR Mar 21, 2022
63873a9
AsyncGenerator should return an iterable of all currently available p…
yaacovCR Mar 1, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .c8rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"exclude": [
"src/**/index.ts",
"src/**/*-fuzz.ts",
"src/execution/executorSchema.ts",
"src/overrides.d.ts",
"src/jsutils/Maybe.ts",
"src/jsutils/ObjMap.ts",
"src/jsutils/PromiseOrValue.ts",
Expand Down
10 changes: 10 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://unpkg.com/@changesets/config@1.6.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
2 changes: 1 addition & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ rules:
no-compare-neg-zero: error
no-cond-assign: error
no-console: warn
no-constant-condition: error
no-constant-condition: [error, { checkLoops: false }]
no-control-regex: error
no-debugger: warn
no-dupe-args: error
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
52 changes: 11 additions & 41 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to graphql-js
# Contributing to graphql-executor

We want to make contributing to this project as easy and transparent as
possible. Hopefully this document makes the process for contributing clear and
Expand All @@ -13,35 +13,25 @@ issue. The best way is to provide a reduced test case on jsFiddle or jsBin.

## Pull Requests

All active development of graphql-js happens on GitHub. We actively welcome
All active development of graphql-executor happens on GitHub. We actively welcome
your [pull requests](https://help.github.com/articles/creating-a-pull-request).

### Considered Changes

Since graphql-js is a reference implementation of the
[GraphQL spec](https://graphql.github.io/graphql-spec/), only changes which comply
with this spec will be considered. If you have a change in mind which requires a
change to the spec, please first open an
Like graphql-js, graphql-executor is
[GraphQL spec](https://graphql.github.io/graphql-spec/) compliant, so only changes
which comply with this spec will be considered. If you have a change in mind which
requires a change to the spec, please first open an
[issue](https://github.com/graphql/graphql-spec/issues/) against the spec.

### GraphQL Specification Membership Agreement

This repository is managed by EasyCLA. Project participants must sign the free ([GraphQL Specification Membership agreement](https://preview-spec-membership.graphql.org) before making a contribution. You only need to do this one time, and it can be signed by [individual contributors](http://individual-spec-membership.graphql.org/) or their [employers](http://corporate-spec-membership.graphql.org/).

To initiate the signature process please open a PR against this repo. The EasyCLA bot will block the merge if we still need a membership agreement from you.

You can find [detailed information here](https://github.com/graphql/graphql-wg/tree/main/membership). If you have issues, please email [operations@graphql.org](mailto:operations@graphql.org).

If your company benefits from GraphQL and you would like to provide essential financial support for the systems and people that power our community, please also consider membership in the [GraphQL Foundation](https://foundation.graphql.org/join).

### Getting Started

1. Fork this repo by using the "Fork" button in the upper-right

2. Check out your fork

```sh
git clone git@github.com:your_name_here/graphql-js.git
git clone git@github.com:your_name_here/graphql-executor.git
```

3. Install or Update all dependencies
Expand All @@ -62,8 +52,9 @@ If your company benefits from GraphQL and you would like to provide essential fi

## Coding Style

This project uses [Prettier](https://prettier.io/) for standard formatting. To
ensure your pull request matches the style guides, run `npm run prettier`.
Like graphql-js, this project uses [Prettier](https://prettier.io/) for standard
formatting. To ensure your pull request matches the style guides, run
`npm run prettier`.

- 2 spaces for indentation (no tabs)
- 80 character line length strongly preferred.
Expand All @@ -74,28 +65,7 @@ ensure your pull request matches the style guides, run `npm run prettier`.
- Trailing commas,
- Avd abbr wrds.

## Release on NPM

_Only core contributors may release to NPM._

To release a new version on NPM, first ensure all tests pass with `npm test`,
then use `npm version patch|minor|major` in order to increment the version in
package.json and tag and commit a release. Then `git push && git push --tags`
to sync this change with source control. Then `npm publish npmDist` to actually
publish the release to NPM.
Once published, add [release notes](https://github.com/graphql/graphql-js/tags).
Use [semver](https://semver.org/) to determine which version part to increment.

Example for a patch release:

```sh
npm test
npm version patch
git push --follow-tags
npm publish npmDist
```

## License

By contributing to graphql-js, you agree that your contributions will be
By contributing to graphql-executor, you agree that your contributions will be
licensed under its [MIT license](../LICENSE).
21 changes: 0 additions & 21 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

82 changes: 34 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,49 +79,6 @@ jobs:
- name: Check that package-lock.json is in sync with package.json
run: git diff --exit-code package-lock.json

integrationTests:
name: Run integration tests
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
# We install bunch of packages during integration tests without locking them
# so we skip cache action to not pollute cache for other jobs.

- name: Install Dependencies
run: npm ci --ignore-scripts

- name: Run Integration Tests
run: npm run check:integrations

fuzz:
name: Run fuzzing tests
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v2
with:
cache: npm
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}

- name: Install Dependencies
run: npm ci --ignore-scripts

- name: Run Tests
run: npm run fuzzonly

coverage:
name: Measure test coverage
runs-on: ubuntu-latest
Expand Down Expand Up @@ -151,11 +108,12 @@ jobs:
fail_ci_if_error: true

test:
name: Run tests on Node v${{ matrix.node_version_to_setup }}
name: Test GraphQL v${{ matrix.graphql_version }} with Node v${{ matrix.node_version_to_setup }}
runs-on: ubuntu-latest
strategy:
matrix:
node_version_to_setup: [12, 14, 16, 17]
graphql_version: [14, 15, 16]
steps:
- name: Checkout repo
uses: actions/checkout@v2
Expand All @@ -171,9 +129,37 @@ jobs:
- name: Install Dependencies
run: npm ci --ignore-scripts

- name: Force GraphQL Version
run: npm install graphql@${{ matrix.graphql_version }} --save=false

- name: Run Tests
run: npm run testonly

build:
name: Build with GraphQL v${{ matrix.graphql_version }}
runs-on: ubuntu-latest
strategy:
matrix:
graphql_version: [14, 15, 16]
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Setup Node.js v${{ matrix.node_version_to_setup }}
uses: actions/setup-node@v2
with:
cache: npm
node-version: ${{ matrix.node_version_to_setup }}

- name: Install Dependencies
run: npm ci --ignore-scripts

- name: Force GraphQL Version
run: npm install graphql@${{ matrix.graphql_version }} --save=false

- name: Run Build
run: npm run build

benchmark:
name: Run benchmark
runs-on: ubuntu-latest
Expand Down Expand Up @@ -240,9 +226,9 @@ jobs:
runs-on: ubuntu-latest
if: |
github.event_name == 'push' &&
github.repository == 'graphql/graphql-js' &&
github.repository == 'yaacovCR/graphql-executor' &&
github.ref == 'refs/heads/main'
needs: [test, fuzz, lint, checkForCommonlyIgnoredFiles, integrationTests]
needs: [test, lint, build, checkForCommonlyIgnoredFiles]
steps:
- name: Checkout repo
uses: actions/checkout@v2
Expand Down Expand Up @@ -272,9 +258,9 @@ jobs:
runs-on: ubuntu-latest
if: |
github.event_name == 'push' &&
github.repository == 'graphql/graphql-js' &&
github.repository == 'yaacovCR/graphql-executor' &&
github.ref == 'refs/heads/main'
needs: [test, fuzz, lint, checkForCommonlyIgnoredFiles, integrationTests]
needs: [test, lint, build, checkForCommonlyIgnoredFiles]
steps:
- name: Checkout repo
uses: actions/checkout@v2
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release

on:
push:
branches:
- main

env:
NODE_VERSION_USED_FOR_DEVELOPMENT: 16
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}

- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-

- name: Install Dependencies
run: npm ci

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@master
with:
version: npm run changeset:version
publish: npm run changeset:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading