Skip to content

Commit eb4cac0

Browse files
committed
2.4.11
1 parent 2ad2f83 commit eb4cac0

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@
1010

1111
### Bug fixes
1212

13+
# 2.4.11 (28 Feb 2025)
14+
15+
### New features
16+
17+
- `InvalidNullError`: Improve default handling to add path and locations #5257
18+
- `DetailedTrace`: Add a sampling profiler for creating detailed traces #5244
19+
20+
### Bug fixes
21+
22+
- `Enum`: Make value methods optional; Add `value_methods(true)` to your base enum class to opt back in. #5255
23+
- `InvalidNullError`: use `GraphQL::Error` as a base class #5248
24+
- CI: test on Mongoid 8 and 9 #5251
25+
1326
# 2.4.10 (18 Feb 2025)
1427

1528
### New features

lib/graphql/schema/member/has_dataloader.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ def dataload(source_class, *source_args, load_key)
2323
# @param find_by_value [Object] Usually an `id`, might be another value if `find_by:` is also provided
2424
# @param find_by [Symbol, String] A column name to look the record up by. (Defaults to the model's primary key.)
2525
# @return [ActiveRecord::Base, nil]
26+
# @example Finding a record by ID
27+
# dataload_record(Post, 5) # Like `Post.find(5)`, but dataloaded
28+
# @example Finding a record by another attribute
29+
# dataload_record(User, "matz", find_by: :handle) # Like `User.find_by(handle: "matz")`, but dataloaded
2630
def dataload_record(model, find_by_value, find_by: nil)
2731
source = if find_by
2832
dataloader.with(Dataloader::ActiveRecordSource, model, find_by: find_by)

lib/graphql/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# frozen_string_literal: true
22
module GraphQL
3-
VERSION = "2.4.10"
3+
VERSION = "2.4.11"
44
end

0 commit comments

Comments
 (0)