Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
e905ddb
feat!: drop Ruby 2.7 and Rails 5.2 support
jkeen Jul 29, 2026
8accdca
ci: remove Ruby 2.x and Rails 5.x from the test matrix
jkeen Jul 29, 2026
c66d0df
chore: target Ruby 3.0 in standardrb config
jkeen Jul 29, 2026
f7f2357
chore: remove Rails 5.2 appraisal and gemfiles
jkeen Jul 29, 2026
c47bb29
chore: mark positional signatures to convert after satellite gems rol…
jkeen Jul 30, 2026
a905fff
feat!: the model you inspect is the model that saves (#465)
jkeen Jul 30, 2026
3935093
2.0.0-beta.1 CHANGELOG [skip ci]
semantic-release-bot Jul 30, 2026
9def865
Merge remote-tracking branch 'origin/main' into beta
jkeen Jul 30, 2026
8e65192
2.0.0-beta.2 CHANGELOG [skip ci]
semantic-release-bot Jul 30, 2026
8ad848d
feat: carry the assigned model on the resource, not through override …
jkeen Jul 31, 2026
a423e0b
2.0.0-beta.3 CHANGELOG [skip ci]
semantic-release-bot Jul 31, 2026
da955a1
feat!: fold graphiti_spec_helpers into graphiti
jkeen Jul 31, 2026
7740f8a
feat!: fold graphiti-rails into graphiti
jkeen Jul 31, 2026
9e00652
fix: make each appraisal test the Rails version it is named for
jkeen Jul 31, 2026
635b249
feat!: require Ruby 3.2 and Rails 7.1
jkeen Aug 3, 2026
e48171c
feat!: handle exceptions with rescue_registry, fold in graphiti_errors
jkeen Aug 3, 2026
3d80ef9
refactor!: bridge the remaining 1.x names
jkeen Aug 4, 2026
d431a03
fix: require active_support so graphiti boots without Rails
jkeen Aug 4, 2026
c1b5fa3
docs: an upgrade guide for 2.0, and Rails setup in the README
jkeen Aug 6, 2026
f114c08
docs: a migration path for non-Rails apps on graphiti_errors
jkeen Aug 6, 2026
9a26b41
docs: write the Responders row the way you'd write it in code
jkeen Aug 6, 2026
cb40a81
docs: cut the feature pitch out of the upgrade guide
jkeen Aug 6, 2026
b313b61
docs: point at the lifecycle hooks guide, which exists
jkeen Aug 6, 2026
4679939
docs: rebuild and absorb the documentation site into this repository
jkeen Aug 7, 2026
81b185f
docs: point the runtime error messages at the new doc URLs
jkeen Aug 7, 2026
10a2a6c
refactor: rename context_namespace to current_action
jkeen Aug 7, 2026
c7a1aca
docs: documents context_namespace → current_action in the authorizati…
jkeen Aug 7, 2026
024824d
feat!: belongs_to renders resource linkage by default
jkeen Aug 7, 2026
976dbc4
fix: a subclass redeclaring a relationship reaches its serializer
jkeen Aug 7, 2026
1c4d94c
refactor: extract shared policy from sync/future resolution paths
jkeen Jul 29, 2026
6137cbb
test: cover the custom primary_key linkage guard against ActiveRecord
jkeen Aug 7, 2026
891d0fd
test: stop configuration_spec leaking a stubbed logger into later exa…
jkeen Jul 29, 2026
fb6976c
docs: reorganize the 2.0 behavior changes
jkeen Aug 7, 2026
c2cec29
ci: publish the docs site from beta
jkeen Aug 7, 2026
6fbbc0e
ci: fix no rails spec and lint error
jkeen Aug 7, 2026
b2e79d2
ci: modernize the release pipeline
jkeen Aug 7, 2026
fdd008b
2.0.0-beta.4 CHANGELOG [skip ci]
semantic-release-bot Aug 7, 2026
62655c2
docs: add a 2.0 beta banner and canonicalize on the apex domain
jkeen Aug 7, 2026
1b04452
docs: restore the background images the archived 1.x site is missing
jkeen Aug 7, 2026
9c8c1c2
docs: credit the creators and maintainer in the footer
jkeen Aug 7, 2026
0a41a60
fix: keep rake task helpers out of the global namespace
hibachrach Aug 7, 2026
70525f7
feat: add rspec matchers for resource relationships and attributes
todtb Aug 7, 2026
5342d0f
docs: tighten the pagination links section
jkeen Aug 7, 2026
f80eb55
docs: fix 1.13 pathname link
jkeen Aug 7, 2026
6ea7141
feat: let the resource generator name the controller
jkeen Aug 7, 2026
df03397
docs: update code highlighting theme from the default, and adjust som…
jkeen Aug 7, 2026
8853aa5
docs: refine language around Graphiti::Rails::Controller upgrade
jkeen Aug 7, 2026
d1cb8c8
docs: fix the Gemfile diff and show the beta pin
jkeen Aug 7, 2026
c204312
fix: drop the relationship guard install notice
jkeen Aug 7, 2026
1170b9d
2.0.0-beta.5 CHANGELOG [skip ci]
semantic-release-bot Aug 7, 2026
8b11151
feat: rename always_include_resource_ids to resource_ids, with a belo…
jkeen Aug 8, 2026
1c41cee
feat: raise MissingRelationshipMethod when rendering reads an associa…
jkeen Aug 8, 2026
84436ea
feat: Add graphiti:audit task to audit resources for issues
jkeen Aug 9, 2026
328dcdb
ci: Add ruby 3.5 to the test matrix
jkeen Aug 9, 2026
5c17899
fix: treat empty polymorphic configuration as unset (#538)
alloutflo Aug 9, 2026
bb3698b
fix: reject invalid page parameters (#537)
aouxwoux Aug 9, 2026
2188bcc
ci: add ruby 4.0 to the test matrix, too
jkeen Aug 9, 2026
ebf2afc
2.0.0-beta.6 CHANGELOG [skip ci]
semantic-release-bot Aug 9, 2026
0da8969
ci: register the 1.x maintenance branch with semantic-release
jkeen Aug 9, 2026
b155849
feat: deprecate SpecHelpers::Sugar in favor of the full helper names
jkeen Aug 9, 2026
894a54a
refactor: keyword args for Query and Runner trailing optionals
jkeen Aug 9, 2026
41290ee
docs: reorder sidebar in order of common -> niche
jkeen Aug 9, 2026
a3d83e3
test: duplicate sideloaded entities should render complete objects
factyy Jul 4, 2024
0c2829a
feat: deduplicate sideloaded entities across include paths
factyy Jul 5, 2024
800b1a2
feat: dedupe under concurrency and across distinct resources
jkeen Aug 9, 2026
007eb55
2.0.0-beta.7 CHANGELOG [skip ci]
semantic-release-bot Aug 10, 2026
ea5c095
chore: modernize faraday and kaminari dev deps
caseyprovost Aug 1, 2026
c047267
refactor: simplify three expressions flagged by newer rubocop cops
caseyprovost Aug 1, 2026
06422bf
chore: upgrade standard 1.4 -> 1.56 and declare rexml explicitly
caseyprovost Aug 1, 2026
fe76c8a
chore: ignore the standardrb reformat in blame
jkeen Aug 10, 2026
d6cfb4f
docs: improve Graphiti intro
jkeen Aug 10, 2026
f5b2156
docs: Update readme, call out how to edit documentation
jkeen Aug 10, 2026
5967aa8
chore: use the apex graphiti.dev domain in docs, error messages and R…
jkeen Aug 10, 2026
76d5329
feat: ship the Rails application template in this repo
jkeen Aug 10, 2026
70741fe
feat(generators): explicit rendering by default, respond_with only wh…
jkeen Aug 10, 2026
84eea12
ci: run the employee_directory suite against the gem under test
jkeen Aug 10, 2026
7fe56dd
docs: standardize examples on explicit rendering, responders as the o…
jkeen Aug 10, 2026
367678e
feat: add full set of commented-out Resource defaults in ApplicationR…
jkeen Aug 10, 2026
bd113ff
chore: lint the Rails app template, exempting only the heredoc cops
jkeen Aug 10, 2026
3756fd1
fix: typecast null values in filter lists (#515)
lntutor Aug 2, 2026
ee685b6
fix: accept a single value for array filters (#517)
Guflly Aug 2, 2026
726a607
ci: dispatch graphiti releases to the example app
jkeen Aug 10, 2026
150ef1a
chore: rake standard task
jkeen Aug 10, 2026
b92c6d9
feat: in-tree plain ruby and sinatra examples
jkeen Aug 10, 2026
43751d1
Merge remote-tracking branch 'origin/main' into beta
jkeen Aug 10, 2026
6c53d79
ci: point lint failures at standardrb --fix
jkeen Aug 10, 2026
47c1f9d
ci: actions/checkout v3 -> v4, silencing the Node 20 deprecations
jkeen Aug 10, 2026
5b4d4ce
2.0.0-beta.8 CHANGELOG [skip ci]
semantic-release-bot Aug 10, 2026
bdf842c
ci: stop every linked issue from getting commented on each time a pre…
jkeen Aug 10, 2026
bb3dfe1
Merge branch 'main' into beta
jkeen Aug 20, 2026
46be6aa
fix: coerce debug flags from env strings
jkeen Aug 20, 2026
8d3b5cc
test: make sure not to load the bundle for no rails spec
jkeen Aug 20, 2026
134d18b
fix: build the entity map when the root query is, not on first use
jkeen Aug 11, 2026
9bc8459
test: sibling sideloads keep their associations on deduplicated records
jkeen Aug 11, 2026
c1d304c
test: record object allocations for every release so we can keep an e…
jkeen Aug 21, 2026
20bf625
perf: nest the entity map instead of keying it by an array
jkeen Aug 21, 2026
b8e6a99
ci: build releases on ruby 4.0
jkeen Aug 21, 2026
d879923
perf: skip the promise machinery when nothing is sideloaded
jkeen Aug 21, 2026
7ef2cea
perf: skip zipping a lone sideload promise
jkeen Aug 21, 2026
32c6c4d
test: cover sibling sideloads resolving in parallel
jkeen Aug 21, 2026
f59ea0b
fix: raise a more helpful named error when belongs_to linkage reads a…
jkeen Aug 21, 2026
5a08c0e
fix: surface the first child error from concurrent polymorphic sideloads
jkeen Aug 21, 2026
4782beb
chore: tell upgraders about the controller include in the merged-gem …
jkeen Aug 21, 2026
34e1dbd
fix: bridge the last 1.x names that died with a bare NameError
jkeen Aug 22, 2026
03e91d7
docs: cover the read-only around_persistence caveat and fix the upgra…
jkeen Aug 22, 2026
e0ae0d8
ci: keep publishing docs once development moves to main
jkeen Aug 22, 2026
b1beee3
fix: keep a customized sideload's instances out of entity dedup
jkeen Aug 22, 2026
31c6d09
ci: gate auto-release on lint as well as tests
jkeen Aug 22, 2026
48630e7
test: point the no-rails subprocess at the bundle's gem path
jkeen Aug 22, 2026
5d302cf
ci: sync the lock file with the new semantic-release exec dependency …
jkeen Aug 22, 2026
40c2d1a
2.0.0-beta.9 CHANGELOG [skip ci]
semantic-release-bot Aug 22, 2026
ce941e7
docs: straighten out the many_to_many examples
jkeen Aug 22, 2026
6036392
fix: let an abstract resource declare relationships
jkeen Aug 22, 2026
39ef393
fix: apply sideloads at definition once setup! has run
jkeen Aug 22, 2026
35acc3e
fix: give client-caused errors real detail and stop 500ing on bad que…
jkeen Aug 22, 2026
51603b8
fix: reject a non-object data payload instead of raising TypeError
jkeen Aug 23, 2026
7092096
feat: carry CurrentAttributes into concurrent sideloads
jkeen Aug 22, 2026
6e017c6
feat: point connection pool timeouts at the sizing formula and add an…
jkeen Aug 22, 2026
0e06c18
docs: explain connection pool sizing
jkeen Aug 22, 2026
57878d1
feat: move link rendering onto the resource as page_links and relatio…
jkeen Aug 22, 2026
236e970
feat: move typecast_reads onto the resource and let the railtie own R…
jkeen Aug 22, 2026
f0e1da1
feat: one link mode per relationship, cascading from relationship_links
jkeen Aug 22, 2026
100a370
feat: split validate_endpoints into validate_requests and validate_links
jkeen Aug 23, 2026
f9ed11f
feat! name the pagination settings after the page param for better in…
jkeen Aug 23, 2026
3fd9a8b
refactor: drive resource settings from one declarative table
jkeen Aug 23, 2026
a108403
feat!: fold allow_nil and deny_empty into one blanks: filter option
jkeen Aug 23, 2026
39cff19
fix: Update some missing sections and terms after renames, register u…
jkeen Aug 24, 2026
01a590c
2.0.0-beta.10 CHANGELOG [skip ci]
semantic-release-bot Aug 24, 2026
cf86a8c
perf: skip the on-demand link strip when no relationship renders link…
jkeen Aug 24, 2026
8a17350
perf: reuse the resolved data and proxies when building cache keys
jkeen Aug 24, 2026
2d26f8c
fix: autolink = true no longer clobbers an inherited :on_demand
jkeen Aug 24, 2026
916aa8c
feat!: omit relationships that render no ids and no link
jkeen Aug 25, 2026
3b934cb
fix: read the links param from the query, not the context object
jkeen Aug 25, 2026
8691b3f
fix: always render included when the client asked to include
jkeen Aug 25, 2026
744f014
perf: only deduplicate resources that two include paths can both reach
jkeen Aug 26, 2026
588503b
fix: stop assigning the same child twice when a resource repeats in t…
jkeen Aug 26, 2026
dcb60b2
perf: memoize whether a belongs_to renders ids from its foreign key
jkeen Aug 26, 2026
7a99b55
rename filters_blanks_by_default to filter_blanks_treated_as and chan…
jkeen Aug 27, 2026
3415592
perf: resolve a lone sideload inline rather than through the pool
jkeen Aug 27, 2026
0b88d54
test: measure and chart the release history
jkeen Aug 27, 2026
f1a57fd
docs: encode curly brackets that were being interpreted as docasaurus…
jkeen Aug 27, 2026
4fc921b
2.0.0-beta.11 CHANGELOG [skip ci]
semantic-release-bot Aug 27, 2026
d0f0e92
fix: compare each concurrency path against itself in the table to bet…
jkeen Aug 28, 2026
52b0642
feat: mark deprecated settings in the generated ApplicationResource
jkeen Aug 27, 2026
6f4783d
feat: add schema rake tasks, so checking a schema no longer means run…
jkeen Aug 29, 2026
d01fd06
feat: take error text from locale keys
jkeen Aug 29, 2026
e369824
feat: declare Graphiti's client errors in rescue_responses
jkeen Aug 29, 2026
a3054bf
ci: enable more test cases, remove outdated spect helpers
jkeen Aug 30, 2026
2a54600
2.0.0-beta.12 CHANGELOG [skip ci]
semantic-release-bot Aug 30, 2026
db92d06
fix(generators): stop injecting a routes host into config/application.rb
jkeen Aug 30, 2026
15f19c1
feat: write every error code Graphiti renders into the generated loca…
jkeen Aug 30, 2026
50a10be
docs: group the 2.0 deprecations so they're easier to navigate
jkeen Aug 30, 2026
f4484e1
chore: finish renaming context_namespace to current_action
jkeen Aug 31, 2026
6569935
fix: keep request state in fiber storage so it survives into child fi…
jkeen Aug 31, 2026
84da045
docs: generate and document update rather than update_attributes
jkeen Aug 31, 2026
88401ab
fix: only register the jsonapi mime type when it is missing
jkeen Aug 31, 2026
62051d7
fix: compare the endpoint id to the payload id as strings
jkeen Aug 31, 2026
71ab441
fix: with_options accepts the predicate backed relationship options
jkeen Aug 31, 2026
833a10b
fix: keep deep filters narrow when an include path repeats
jkeen Aug 31, 2026
d56b86a
fix: evaluate writable guards under the action being performed
jkeen Aug 31, 2026
a9b7473
test: pin what the attributes callbacks receive with a sideposted parent
jkeen Aug 31, 2026
2c9c7c7
fix: keep a belongs_to linkage when another include shares its name
jkeen Aug 31, 2026
7380ef9
perf: record latest performance stats
jkeen Aug 31, 2026
e1fb73d
2.0.0-beta.13 CHANGELOG [skip ci]
semantic-release-bot Aug 31, 2026
8ef5d01
chore: update dependency to rescue_registry 1.1 and off develop branch
jkeen Sep 1, 2026
9dca879
Merge remote-tracking branch 'origin/main' into beta
jkeen Sep 1, 2026
ac63996
fix: require rescue_registry 1.1 for the fiber storage fix
jkeen Sep 1, 2026
8380da7
docs: the 2.0 banner no longer says beta
jkeen Sep 1, 2026
b66fb8e
fix: remove the unused ActiveRecord adapter create and update
jkeen Sep 1, 2026
39d67e1
ci: run CI on the 1.x maintenance branch and register it with semanti…
jkeen Aug 9, 2026
ccb5f71
perf: stop building a key for every record an association is checked …
jkeen Sep 1, 2026
99656e1
perf: fingerprint the checkout being measured, not the working tree
jkeen Sep 1, 2026
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 .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# standardrb reformat from the 1.4 -> 1.56 upgrade
5fe4fe5188f75461be817528c8d911090ce94340
230 changes: 103 additions & 127 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches: [main]
branches: [main, 1.x, beta]
pull_request: {}
workflow_dispatch: {}

Expand All @@ -15,167 +15,143 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
ruby-version: "3.2"
bundler-cache: true
- name: Run standardrb
run: bundle exec standardrb --no-fix --format progress
run: |
bundle exec standardrb --no-fix --format progress || {
echo "::error::Lint failed. Almost everything standard flags is auto-fixable — run 'bundle exec standardrb --fix' locally and push the result."
exit 1
}
test:
name: "Tests - ${{ matrix.ruby }} | ${{ matrix.gemfile }} | Appraisal: ${{ matrix.appraisal }}"
name: "Tests - ${{ matrix.ruby }} | ${{ matrix.gemfile }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
# Every cell is listed explicitly rather than built from a cross product
# plus `exclude:`. An exclude row naming a gemfile that does not exist is
# silently ignored, which is how this matrix carried four dead rows for a
# "rails_7_0_graphiti_rails.gemfile" that was never generated. A bad
# gemfile path in an include row fails the job loudly instead.
#
# Ruby coverage per Rails version tracks that version's own supported
# range; see Appraisals for the matching sqlite3 constraints.
matrix:
ruby:
- "2.7"
- "3.0"
- "3.1"
- "3.2"
- "3.3"
- "3.4"
gemfile:
- Gemfile
- gemfiles/rails_5_2.gemfile
- gemfiles/rails_6.gemfile
- gemfiles/rails_7.gemfile
- gemfiles/rails_5_2_graphiti_rails.gemfile
- gemfiles/rails_6_graphiti_rails.gemfile
- gemfiles/rails_7_graphiti_rails.gemfile
- gemfiles/rails_7_1_graphiti_rails.gemfile
- gemfiles/rails_7_2_graphiti_rails.gemfile
- gemfiles/rails_8_0_graphiti_rails.gemfile
- gemfiles/rails_8_1_graphiti_rails.gemfile
appraisal:
- true
- false
include:
- ruby: ruby-head
gemfile: gemfiles/rails_7_1.gemfile
appraisal: true
- ruby: ruby-head
gemfile: gemfiles/rails_7_2_graphiti_rails.gemfile
appraisal: true
- ruby: ruby-head
gemfile: gemfiles/rails_8_0_graphiti_rails.gemfile
appraisal: true
- ruby: ruby-head
gemfile: gemfiles/rails_8_1_graphiti_rails.gemfile
appraisal: true
- ruby: ruby-head
gemfile: Gemfile
appraisal: false
exclude:
# Skip some extra variants
- gemfile: Gemfile
appraisal: true
- gemfile: gemfiles/rails_5_2.gemfile
appraisal: false
- gemfile: gemfiles/rails_6.gemfile
appraisal: false
- gemfile: gemfiles/rails_7.gemfile
appraisal: false
- gemfile: gemfiles/rails_5_2_graphiti_rails.gemfile
appraisal: false
- gemfile: gemfiles/rails_6_graphiti_rails.gemfile
appraisal: false
- gemfile: gemfiles/rails_7_graphiti_rails.gemfile
appraisal: false
- gemfile: gemfiles/rails_7_1_graphiti_rails.gemfile
appraisal: false
- gemfile: gemfiles/rails_7_2_graphiti_rails.gemfile
appraisal: false
- gemfile: gemfiles/rails_8_0_graphiti_rails.gemfile
appraisal: false
- gemfile: gemfiles/rails_8_1_graphiti_rails.gemfile
appraisal: false
# No Rails - the library on its own, across every supported Ruby
- { ruby: "3.2", gemfile: Gemfile, appraisal: false }
- { ruby: "3.3", gemfile: Gemfile, appraisal: false }
- { ruby: "3.4", gemfile: Gemfile, appraisal: false }
- { ruby: "4.0", gemfile: Gemfile, appraisal: false }
- { ruby: ruby-head, gemfile: Gemfile, appraisal: false }

# Rails 8.1 needs ruby 3.2 +
- gemfile: gemfiles/rails_8_1_graphiti_rails.gemfile
ruby: 2.7
- gemfile: gemfiles/rails_8_1_graphiti_rails.gemfile
ruby: 3.0
- gemfile: gemfiles/rails_8_1_graphiti_rails.gemfile
ruby: 3.1
# Rails 7.1 - the floor
- { ruby: "3.2", gemfile: gemfiles/rails_7_1.gemfile, appraisal: true }
- { ruby: "3.4", gemfile: gemfiles/rails_7_1.gemfile, appraisal: true }
- { ruby: "4.0", gemfile: gemfiles/rails_7_1.gemfile, appraisal: true }

# Rails 8 needs ruby 3.2 +
- gemfile: gemfiles/rails_8_0_graphiti_rails.gemfile
ruby: 2.7
- gemfile: gemfiles/rails_8_0_graphiti_rails.gemfile
ruby: 3.0
- gemfile: gemfiles/rails_8_0_graphiti_rails.gemfile
ruby: 3.1
# Rails 7.2
- { ruby: "3.2", gemfile: gemfiles/rails_7_2.gemfile, appraisal: true }
- { ruby: "3.4", gemfile: gemfiles/rails_7_2.gemfile, appraisal: true }
- { ruby: "4.0", gemfile: gemfiles/rails_7_2.gemfile, appraisal: true }
- { ruby: ruby-head, gemfile: gemfiles/rails_7_2.gemfile, appraisal: true }

# Rails 7.2 needs ruby 3.1 +
- gemfile: gemfiles/rails_7_2_graphiti_rails.gemfile
ruby: 2.7
- gemfile: gemfiles/rails_7_2_graphiti_rails.gemfile
ruby: 3.0
# Rails 8.0
- { ruby: "3.2", gemfile: gemfiles/rails_8_0.gemfile, appraisal: true }
- { ruby: "3.4", gemfile: gemfiles/rails_8_0.gemfile, appraisal: true }
- { ruby: "4.0", gemfile: gemfiles/rails_8_0.gemfile, appraisal: true }
- { ruby: ruby-head, gemfile: gemfiles/rails_8_0.gemfile, appraisal: true }

# Rails 7.1 needs ruby 3.0 +
- gemfile: gemfiles/rails_7_1_graphiti_rails.gemfile
ruby: 2.7
- gemfile: gemfiles/rails_7_1_graphiti_rails.gemfile
ruby: 3.0
# Rails 8.1
- { ruby: "3.2", gemfile: gemfiles/rails_8_1.gemfile, appraisal: true }
- { ruby: "3.4", gemfile: gemfiles/rails_8_1.gemfile, appraisal: true }
- { ruby: "4.0", gemfile: gemfiles/rails_8_1.gemfile, appraisal: true }
- { ruby: ruby-head, gemfile: gemfiles/rails_8_1.gemfile, appraisal: true }

# Rails 7.0 needs ruby 3.1 +
- gemfile: gemfiles/rails_7_0_graphiti_rails.gemfile
ruby: 3.2
- gemfile: gemfiles/rails_7_0_graphiti_rails.gemfile
ruby: 3.3
- gemfile: gemfiles/rails_7_0_graphiti_rails.gemfile
ruby: 3.4

# Rails 6 needs < ruby 3.4
- gemfile: gemfiles/rails_6.gemfile
ruby: 3.4
- gemfile: gemfiles/rails_6_graphiti_rails.gemfile
ruby: 3.4

# Rails 5 can't run on Ruby 3
- gemfile: gemfiles/rails_5_2.gemfile
ruby: 3.0
- gemfile: gemfiles/rails_5_2_graphiti_rails.gemfile
ruby: 3.0
- gemfile: gemfiles/rails_5_2.gemfile
ruby: 3.1
- gemfile: gemfiles/rails_5_2_graphiti_rails.gemfile
ruby: 3.1
- gemfile: gemfiles/rails_5_2.gemfile
ruby: 3.2
- gemfile: gemfiles/rails_5_2_graphiti_rails.gemfile
ruby: 3.2
- gemfile: gemfiles/rails_5_2.gemfile
ruby: 3.3
- gemfile: gemfiles/rails_5_2_graphiti_rails.gemfile
ruby: 3.3
- gemfile: gemfiles/rails_5_2.gemfile
ruby: 3.4
- gemfile: gemfiles/rails_5_2_graphiti_rails.gemfile
ruby: 3.4
continue-on-error: ${{ matrix.ruby == 'ruby-head' }}
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
steps:
- name: Set up Appraisal
if: matrix.appraisal
run: echo "APPRAISAL_INITIALIZED=true" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rspec
# spec_helper narrows "bundle exec rspec" to spec/integration/rails when
# APPRAISAL_INITIALIZED is set, so the step above never runs the library
# suite. This is the only cell that runs it against a pinned Rails.
- name: Run the library suite against this Rails
if: matrix.appraisal
run: env -u APPRAISAL_INITIALIZED bundle exec rspec
example-app:
name: "Example app (employee_directory)"
runs-on: ubuntu-latest
# The example app lives in its own repo and can lag behind; it is an
# integration canary, not a merge gate.
continue-on-error: true
env:
GRAPHITI_PATH: ${{ github.workspace }}/graphiti
BUNDLE_FROZEN: "false" # the path override rewrites the checked-in lockfile
defaults:
run:
working-directory: employee_directory
steps:
- uses: actions/checkout@v4
with:
path: graphiti
- uses: actions/checkout@v4
with:
repository: graphiti-api/employee_directory
path: employee_directory
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- name: Bundle against this graphiti
run: bundle install
- name: Run the example app suite
run: |
bundle exec rails db:test:prepare
bundle exec rspec
examples:
name: "Examples (plain ruby, sinatra)"
runs-on: ubuntu-latest
# In-tree examples run against the working copy via their path: Gemfiles.
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
- name: Run the plain ruby example
working-directory: examples/plain_ruby
run: |
bundle install
bundle exec ruby index.rb
- name: Run the sinatra example
working-directory: examples/sinatra
run: |
bundle install
bundle exec ruby smoke.rb
publish:
name: Release
runs-on: ubuntu-latest
# Only main auto-releases. Beta releases are cut by manually running
# "Generate New Release" with the beta branch selected.
if: github.ref == 'refs/heads/main'
needs: [test]
needs: [lint, test]
steps:
- name: Dispatch Release
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Generate New Release
# Without an explicit ref the dispatch runs against the default
# branch rather than the branch that triggered it.
ref: ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
60 changes: 60 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Docs

# Publishes the documentation site from beta, and from main once 2.0 lands
# there. graphiti.dev now points at this repo via website/static/CNAME, so this
# deploy is the live site: the 1.x Jekyll site is frozen under
# website/static/1.13 and ships with every build, and graphiti-api.github.io no
# longer serves the domain.
on:
push:
branches: [beta, main]
paths:
- 'docs/**'
- 'website/**'
- '.github/workflows/docs.yml'
workflow_dispatch: {}

# One static group: deploys from different branches force-push the same
# gh-pages branch, so they must not interleave.
concurrency:
group: docs
cancel-in-progress: true

permissions:
contents: write

jobs:
deploy:
name: Build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
cache-dependency-path: website/package-lock.json

- name: Install
working-directory: website
run: npm ci

- name: Build
working-directory: website
run: npm run build

- name: Publish to gh-pages
working-directory: website/build
run: |
set -euo pipefail
# Pages skips directories beginning with an underscore unless Jekyll
# is switched off, and Docusaurus emits some.
touch .nojekyll
git init --quiet --initial-branch=gh-pages
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add --all
git commit --quiet -m "docs: build ${GITHUB_SHA::7} from ${GITHUB_REF_NAME}"
git push --force --quiet \
"https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git" \
gh-pages
18 changes: 18 additions & 0 deletions .github/workflows/notify-example-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Notify example app

on:
release:
types: [published]

jobs:
dispatch:
name: Dispatch employee_directory update
runs-on: ubuntu-latest
steps:
- name: Send repository_dispatch
run: |
gh api -X POST repos/graphiti-api/employee_directory/dispatches \
-f event_type=graphiti-release \
-f 'client_payload[version]=${{ github.event.release.tag_name }}'
env:
GH_TOKEN: ${{ secrets.EXAMPLE_APP_TOKEN }}
18 changes: 10 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v5
with:
submodules: true
persist-credentials: false
# semantic-release reads the tag history to work out the next version
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
ruby-version: "4.0"
- name: Build
run: |
gem install bundler
git submodule update --init --recursive
bundle install --jobs 4 --retry 3
- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 14
# semantic-release 25 and its plugins require ^22.22.2 || >=24.15
node-version: "24"
cache: npm
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
run: node_modules/.bin/semantic-release
run: npx semantic-release
Loading
Loading