Skip to content

Commit

Permalink
Merge pull request #3042 from alphagov/ministers-index-graphql-eagerload
Browse files Browse the repository at this point in the history
Swap Ministers Index GraphQL #joins for #includes
  • Loading branch information
mike3985 authored Dec 16, 2024
2 parents 92d6dd0 + 41c9d7a commit 0e6b2aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/graphql/types/base_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def self.links_field(field_name_and_link_type, graphql_field_type)
define_method(field_name_and_link_type.to_sym) do
Edition
.live
.joins(document: { reverse_links: :link_set })
.includes(document: { reverse_links: :link_set })
.where(
document: { locale: "en" },
link_set: { content_id: object.content_id },
Expand Down
2 changes: 1 addition & 1 deletion app/graphql/types/ministers_index_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class MinistersIndexPersonLinks < Types::BaseObject
def role_appointments
Edition
.live
.joins(
.includes(
document: {
reverse_links: { # role -> role_appointment
link_set: {
Expand Down

0 comments on commit 0e6b2aa

Please sign in to comment.