Sha256: 3f2835fbe10b2e5df85c266574cdf5d7f4e961ee8deda7aed78cdffd5249ea85

Contents?: true

Size: 1.1 KB

Versions: 8

Compression:

Stored size: 1.1 KB

Contents

# frozen_string_literal: true

module Decidim
  module Budgets
    ProjectType = GraphQL::ObjectType.define do
      interfaces [
        -> { Decidim::Core::ScopableInterface },
        -> { Decidim::Core::AttachableInterface },
        -> { Decidim::Comments::CommentableInterface },
        -> { Decidim::Core::CategorizableInterface }
      ]

      name "Project"
      description "A project"

      field :id, !types.ID, "The internal ID for this project"
      field :title, Decidim::Core::TranslatedFieldType, "The title for this project"
      field :description, Decidim::Core::TranslatedFieldType, "The description for this project"
      field :budget_amount, types.Int, "The budget amount for this project"
      field :selected, types.Boolean, "Whether this proposal is selected or not", property: :selected?
      field :createdAt, Decidim::Core::DateTimeType, "When this project was created", property: :created_at
      field :updatedAt, Decidim::Core::DateTimeType, "When this project was updated", property: :updated_at
      field :reference, types.String, "The reference for this project"
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
decidim-budgets-0.23.6 app/types/decidim/budgets/project_type.rb
decidim-budgets-0.23.5 app/types/decidim/budgets/project_type.rb
decidim-budgets-0.23.4 app/types/decidim/budgets/project_type.rb
decidim-budgets-0.23.3 app/types/decidim/budgets/project_type.rb
decidim-budgets-0.23.2 app/types/decidim/budgets/project_type.rb
decidim-budgets-0.23.1 app/types/decidim/budgets/project_type.rb
decidim-budgets-0.23.1.rc1 app/types/decidim/budgets/project_type.rb
decidim-budgets-0.23.0 app/types/decidim/budgets/project_type.rb