Skip to content

Commit

Permalink
(fix) ensure aggregate fields are loaded in Graphql 2.3 (#18)
Browse files Browse the repository at this point in the history
* fix: initialize attributes array

* fix: ensure loaded
  • Loading branch information
lemuelbarango authored Oct 28, 2024
1 parent ab7906f commit 1bd9296
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/graphql/groups/has_aggregates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def aggregate(name, *_, **options, &block)

def aggregate_field(*args, **kwargs, &block)
field_defn = Schema::AggregateField.from_options(*args, owner: self, **kwargs, &block)
field_defn.ensure_loaded
add_field(field_defn)
field_defn
end
Expand Down

0 comments on commit 1bd9296

Please sign in to comment.