Sha256: 2fbb48e9eee10916355c50389ba9631d276de36c2a934e81c4b72eca233369e5

Contents?: true

Size: 605 Bytes

Versions: 10

Compression:

Stored size: 605 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Meetings
    # This interface represents all linked resources available in the module meetings
    LinkedResourcesInterface = GraphQL::InterfaceType.define do
      name "MeetinsLinkedResourcewInterface"
      description "An interface that can be used with Resourceable models."

      field :proposalsFromMeeting, !types[Decidim::Proposals::ProposalType], "Proposals created in this meeting" do
        resolve ->(meeting, _args, _ctx) {
          meeting.linked_resources(:proposals, :proposals_from_meeting)
        }
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
decidim-meetings-0.23.6 lib/decidim/api/linked_resources_interface.rb
decidim-meetings-0.23.5 lib/decidim/api/linked_resources_interface.rb
decidim-meetings-0.23.4 lib/decidim/api/linked_resources_interface.rb
decidim-meetings-0.23.3 lib/decidim/api/linked_resources_interface.rb
decidim-meetings-0.23.2 lib/decidim/api/linked_resources_interface.rb
decidim-meetings-0.23.1 lib/decidim/api/linked_resources_interface.rb
decidim-meetings-0.23.1.rc1 lib/decidim/api/linked_resources_interface.rb
decidim-meetings-0.23.0 lib/decidim/api/linked_resources_interface.rb
decidim-meetings-0.22.0 lib/decidim/api/linked_resources_interface.rb
decidim-meetings-0.21.0 lib/decidim/api/linked_resources_interface.rb