Skip to content

Commit cfc2ea3

Browse files
committed
Merge branch 'master' into fields-will-merge-response-type-check
2 parents 6b6648c + ddf2550 commit cfc2ea3

File tree

777 files changed

+95082
-12298
lines changed

Some content is hidden

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

777 files changed

+95082
-12298
lines changed

Diff for: .github/workflows/apidocs.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Checkout release tag
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2525
with:
2626
ref: ${{ env.GITHUB_REF }}
2727
- name: Checkout GitHub pages branch
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929
with:
3030
path: gh-pages
3131
ref: gh-pages
3232
- uses: ruby/setup-ruby@v1
3333
with:
34-
ruby-version: '3.0'
34+
ruby-version: '3.2'
3535
bundler-cache: true
3636
- name: Build API docs
3737
run: |

Diff for: .github/workflows/ci.yaml

+66-32
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,32 @@ jobs:
66
lint:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
9+
- uses: actions/checkout@v4
1010
- uses: ruby/setup-ruby@v1
1111
with:
12-
ruby-version: 2.6
12+
ruby-version: 3.4
1313
bundler-cache: true
1414
- run: bundle exec rake rubocop
1515
system_tests:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: shogo82148/actions-setup-redis@v1
19+
with:
20+
redis-version: "7.x"
21+
- run: redis-cli ping
22+
- uses: actions/checkout@v4
1923
- uses: ruby/setup-ruby@v1
2024
with:
21-
ruby-version: 2.7.3
25+
ruby-version: 3.4
2226
bundler-cache: true
2327
env:
24-
BUNDLE_GEMFILE: ./spec/dummy/Gemfile
25-
- run: bundle exec rails test:system
28+
BUNDLE_GEMS__GRAPHQL__PRO: ${{ secrets.BUNDLE_GEMS__GRAPHQL__PRO }}
29+
BUNDLE_GEMFILE: gemfiles/rails_master.gemfile
30+
- run: bin/rails test:all
2631
working-directory: ./spec/dummy
32+
env:
33+
BUNDLE_GEMS__GRAPHQL__PRO: ${{ secrets.BUNDLE_GEMS__GRAPHQL__PRO }}
34+
BUNDLE_GEMFILE: ../../gemfiles/rails_master.gemfile
2735
# Some coverage goals of these tests:
2836
# - Test once without Rails at all
2937
# - Test postgres, to make sure that the ActiveRecord
@@ -38,42 +46,65 @@ jobs:
3846
matrix:
3947
include:
4048
- gemfile: Gemfile
41-
ruby: 3.1
42-
- gemfile: gemfiles/rails_4.2.gemfile
43-
ruby: 2.4
44-
bundler: "1"
45-
- gemfile: gemfiles/rails_5.2.gemfile
46-
ruby: 2.7
47-
# Rails 6.1 is tested with Postgresql below
49+
ruby: 3.4
50+
- gemfile: Gemfile
51+
ruby: 2.7 # lowest supported version
4852
- gemfile: gemfiles/rails_7.0.gemfile
4953
ruby: 3.1
50-
- gemfile: gemfiles/rails_master.gemfile
51-
ruby: 3.1
5254
- gemfile: gemfiles/rails_7.0.gemfile
5355
ruby: 3.2
56+
- gemfile: gemfiles/rails_7.1.gemfile
57+
ruby: 3.3
5458
- gemfile: gemfiles/rails_master.gemfile
55-
ruby: 3.2
59+
ruby: 3.3
60+
graphql_reject_numbers_followed_by_names: 1
61+
redis: 1
62+
- gemfile: gemfiles/rails_master.gemfile
63+
ruby: 3.4
64+
graphql_reject_numbers_followed_by_names: 1
65+
isolation_level_fiber: 1
66+
redis: 1
5667
runs-on: ubuntu-latest
5768
steps:
5869
- run: echo BUNDLE_GEMFILE=${{ matrix.gemfile }} > $GITHUB_ENV
59-
- uses: actions/checkout@v3
70+
- run: echo GRAPHQL_REJECT_NUMBERS_FOLLOWED_BY_NAMES=1 > $GITHUB_ENV
71+
if: ${{ !!matrix.graphql_reject_numbers_followed_by_names }}
72+
- run: echo ISOLATION_LEVEL_FIBER=1 > $GITHUB_ENV
73+
if: ${{ !!matrix.isolation_level_fiber }}
74+
- uses: shogo82148/actions-setup-redis@v1
75+
with:
76+
redis-version: "7.x"
77+
if: ${{ !!matrix.redis }}
78+
- run: redis-cli ping
79+
if: ${{ !!matrix.redis }}
80+
- uses: actions/checkout@v4
6081
- uses: ruby/setup-ruby@v1
6182
with:
6283
ruby-version: ${{ matrix.ruby }}
6384
bundler-cache: true
64-
bundler: ${{ matrix.bundler || 'default' }}
85+
- run: bundle exec rake compile
6586
- run: bundle exec rake test
6687
javascript_test:
6788
runs-on: ubuntu-latest
6889
steps:
69-
- uses: actions/checkout@v3
70-
- uses: ruby/setup-ruby@v1
90+
- uses: actions/checkout@v4
91+
- uses: actions/setup-node@v4
7192
with:
72-
ruby-version: 2.7
73-
bundler-cache: true
74-
- run: bundle exec rake js:all
93+
node-version: '21'
94+
- run: npm ci
95+
working-directory: ./javascript_client
96+
- run: npm test
97+
working-directory: ./javascript_client
7598
postgres_test:
7699
runs-on: ubuntu-latest
100+
strategy:
101+
matrix:
102+
include:
103+
- gemfile: gemfiles/rails_master.gemfile
104+
ruby: 3.3
105+
isolation_level_fiber: 1
106+
- gemfile: gemfiles/rails_7.1_postgresql.gemfile
107+
ruby: 3.3
77108
services:
78109
postgres:
79110
image: postgres:latest
@@ -90,22 +121,25 @@ jobs:
90121
--health-timeout 5s
91122
--health-retries 5
92123
steps:
93-
- run: echo BUNDLE_GEMFILE='gemfiles/rails_6.1_postgresql.gemfile' > $GITHUB_ENV
124+
- run: echo BUNDLE_GEMFILE='' > $GITHUB_ENV
94125
- run: echo DATABASE='POSTGRESQL' > $GITHUB_ENV
95126
- run: echo PGPASSWORD='postgres' > $GITHUB_ENV
96-
- uses: actions/checkout@v3
127+
- run: echo GRAPHQL_CPARSER=1 > $GITHUB_ENV
128+
- run: echo ISOLATION_LEVEL_FIBER=1 > $GITHUB_ENV
129+
if: ${{ !!matrix.isolation_level_fiber }}
130+
- uses: actions/checkout@v4
97131
- uses: ruby/setup-ruby@v1
98132
with:
99-
ruby-version: 2.7
133+
ruby-version: "3.3"
100134
bundler-cache: true
101-
- run: bundle exec rake test
135+
- run: bundle exec rake compile test
102136
mongodb_test:
103137
strategy:
104138
fail-fast: false
105139
matrix:
106140
gemfile:
107-
- gemfiles/mongoid_6.gemfile
108-
- gemfiles/mongoid_7.gemfile
141+
- gemfiles/mongoid_9.gemfile
142+
- gemfiles/mongoid_8.gemfile
109143
runs-on: ubuntu-latest
110144
services:
111145
mongodb:
@@ -114,9 +148,9 @@ jobs:
114148
- 27017:27017
115149
steps:
116150
- run: echo BUNDLE_GEMFILE=${{ matrix.gemfile }} > $GITHUB_ENV
117-
- uses: actions/checkout@v3
151+
- uses: actions/checkout@v4
118152
- uses: ruby/setup-ruby@v1
119153
with:
120-
ruby-version: 2.7
154+
ruby-version: 3.4
121155
bundler-cache: true
122-
- run: bundle exec rake test
156+
- run: bundle exec rake compile test

Diff for: .github/workflows/pronto.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Pronto
2+
on:
3+
- pull_request_target
4+
5+
jobs:
6+
pronto:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- run: echo BUNDLE_GEMFILE=gemfiles/pronto.gemfile > $GITHUB_ENV
10+
- name: Checkout code
11+
uses: actions/checkout@v4
12+
- run: git fetch --no-tags --prune --unshallow origin +refs/heads/*:refs/remotes/origin/*
13+
- name: Setup Ruby
14+
uses: ruby/setup-ruby@v1
15+
with:
16+
ruby-version: 3.4
17+
bundler-cache: true
18+
- name: Run Pronto
19+
run: bundle exec pronto run -f github_pr -c origin/${{ github.base_ref }}
20+
env:
21+
PRONTO_PULL_REQUEST_ID: ${{ github.event.pull_request.number }}
22+
PRONTO_GITHUB_ACCESS_TOKEN: "${{ github.token }}"

Diff for: .github/workflows/website.yaml

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
name: Publish Website
22
on:
3+
# For some reason, `on: release: ...` didn't work with `nektos/act`
34
push:
4-
branches: [master]
5+
# Sequence of patterns matched against refs/tags
6+
tags:
7+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
8+
workflow_dispatch:
59

610
permissions: {}
711
jobs:
@@ -12,9 +16,9 @@ jobs:
1216
runs-on: ubuntu-latest
1317
steps:
1418
- name: Checkout master
15-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
1620
- name: Checkout GitHub pages branch
17-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
1822
with:
1923
path: gh-pages
2024
ref: gh-pages
@@ -29,8 +33,8 @@ jobs:
2933
bundle exec rake site:fetch_latest site:build_doc site:update_search_index site:clean_html site:build_html
3034
- name: Commit changes as last committer
3135
run: |
32-
git config --global user.name "%(git log --format="%aN" -n 1)"
33-
git config --global user.email "%(git log --format="%aE" -n 1)"
36+
git config --global user.name "$(git log --format="%aN" -n 1)"
37+
git config --global user.email "$(git log --format="%aE" -n 1)"
3438
bundle exec rake site:commit_changes
3539
- name: Deploy to GitHub pages via gh-pages branch
3640
uses: s0/git-publish-subdir-action@master

Diff for: .gitignore

+11-1
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,25 @@ Gemfile.lock
77
gemfiles/*.lock
88
# Test database
99
*.db
10+
*.db-shm
11+
*.db-wal
12+
*.sqlite3
13+
.byebug_history
1014
.bundle/
1115
vendor/
1216
.idea/
17+
coverage/
1318

1419
_site
1520
.sass-cache
1621
.jekyll-metadata
1722
.jekyll-cache
1823
gh-pages/
1924
tmp/*
20-
__*.db
2125
node_modules/
2226
yarn.lock
2327
OperationStoreClient.js
28+
DumpPayloadExample.json
2429
spec/integration/tmp
2530
.vscode/
2631
*.swp
@@ -33,3 +38,8 @@ javascript_client/subscriptions
3338
javascript_client/sync
3439
javascript_client/cli*
3540
javascript_client/index*
41+
# Don't commit compiled extension files:
42+
*.bundle
43+
*.so
44+
# Ragel generates Ruby type hints which is great, but I'm not ready to support them
45+
*.ri

Diff for: .rubocop.yml

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
require:
22
- ./cop/development/none_without_block_cop
3+
- ./cop/development/no_eval_cop
34
- ./cop/development/no_focus_cop
45
- ./lib/graphql/rubocop/graphql/default_null_true
56
- ./lib/graphql/rubocop/graphql/default_required_true
67
- ./cop/development/context_is_passed_cop
8+
- ./cop/development/trace_methods_cop.rb
79

810
AllCops:
911
DisabledByDefault: true
1012
SuggestExtensions: false
11-
TargetRubyVersion: 2.4
13+
TargetRubyVersion: 2.7
1214
Exclude:
1315
- 'lib/graphql/language/lexer.rb'
1416
- 'lib/graphql/language/parser.rb'
@@ -22,21 +24,9 @@ Development/ContextIsPassedCop:
2224
Exclude:
2325
- 'spec/**/*'
2426
- 'cop/**/*'
25-
# Legacy-related:
26-
- 'lib/graphql/*_type.rb'
27-
- 'lib/graphql/define/**/*.rb'
28-
- 'lib/graphql/relay/**/*'
29-
- 'lib/graphql/function.rb'
30-
- 'lib/graphql/directive.rb'
31-
- 'lib/graphql/field.rb'
32-
- 'lib/graphql/schema/traversal.rb'
33-
- 'lib/graphql/schema/possible_types.rb'
3427
- 'lib/graphql/schema/validation.rb'
35-
- 'lib/graphql/compatibility/**/*'
36-
- 'lib/graphql/static_validation/type_stack.rb'
3728
- 'lib/graphql/static_validation/literal_validator.rb'
3829
- 'lib/graphql/static_validation/rules/**/*.rb'
39-
- 'lib/graphql/internal_representation/**/*.rb'
4030
# AST-related:
4131
- 'lib/graphql/schema/build_from_definition.rb'
4232
- 'lib/graphql/language/printer.rb'
@@ -52,10 +42,19 @@ Development/NoneWithoutBlockCop:
5242
- "lib/**/*"
5343
- "spec/**/*"
5444

45+
Development/NoEvalCop:
46+
Include:
47+
- "lib/**/*"
48+
5549
Development/NoFocusCop:
5650
Include:
5751
- "spec/**/*"
5852

53+
Development/TraceMethodsCop:
54+
Include:
55+
- "lib/graphql/tracing/perfetto_trace.rb"
56+
- "lib/graphql/tracing/notifications_trace.rb"
57+
5958
# def ...
6059
# end
6160
Layout/DefEndAlignment:

0 commit comments

Comments
 (0)