Skip to content

Commit

Permalink
2.4.11
Browse files Browse the repository at this point in the history
  • Loading branch information
rmosolgo committed Feb 28, 2025
1 parent 2ad2f83 commit eb4cac0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@

### Bug fixes

# 2.4.11 (28 Feb 2025)

### New features

- `InvalidNullError`: Improve default handling to add path and locations #5257
- `DetailedTrace`: Add a sampling profiler for creating detailed traces #5244

### Bug fixes

- `Enum`: Make value methods optional; Add `value_methods(true)` to your base enum class to opt back in. #5255
- `InvalidNullError`: use `GraphQL::Error` as a base class #5248
- CI: test on Mongoid 8 and 9 #5251

# 2.4.10 (18 Feb 2025)

### New features
Expand Down
4 changes: 4 additions & 0 deletions lib/graphql/schema/member/has_dataloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ def dataload(source_class, *source_args, load_key)
# @param find_by_value [Object] Usually an `id`, might be another value if `find_by:` is also provided
# @param find_by [Symbol, String] A column name to look the record up by. (Defaults to the model's primary key.)
# @return [ActiveRecord::Base, nil]
# @example Finding a record by ID
# dataload_record(Post, 5) # Like `Post.find(5)`, but dataloaded
# @example Finding a record by another attribute
# dataload_record(User, "matz", find_by: :handle) # Like `User.find_by(handle: "matz")`, but dataloaded
def dataload_record(model, find_by_value, find_by: nil)
source = if find_by
dataloader.with(Dataloader::ActiveRecordSource, model, find_by: find_by)
Expand Down
2 changes: 1 addition & 1 deletion lib/graphql/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# frozen_string_literal: true
module GraphQL
VERSION = "2.4.10"
VERSION = "2.4.11"
end

0 comments on commit eb4cac0

Please sign in to comment.