Skip to content

Commit

Permalink
Fix camelCase API field names to snake case
Browse files Browse the repository at this point in the history
  • Loading branch information
ahukkanen committed Jul 7, 2023
1 parent c0b6de4 commit c69d70b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/decidim/api/plan_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ class PlanType < GraphQL::Schema::Object
field :state, GraphQL::Types::String, description: "The answer status in which plan is in", null: true
field :answer, Decidim::Core::TranslatedFieldType, description: "The answer feedback for the status for this plan", null: true

field :closedAt, Decidim::Core::DateTimeType, method: :closed_at, null: true do
field :closed_at, Decidim::Core::DateTimeType, null: true do
description "The date and time this plan was closed"
end

field :answeredAt, Decidim::Core::DateTimeType, method: :answered_at, null: true do
field :answered_at, Decidim::Core::DateTimeType, null: true do
description "The date and time this plan was answered"
end

field :publishedAt, Decidim::Core::DateTimeType, method: :published_at, null: true do
field :published_at, Decidim::Core::DateTimeType, null: true do
description "The date and time this plan was published"
end

Expand All @@ -47,19 +47,17 @@ def self.add_linked_resources_field
# These are the resources that are linked from the plan to the related
# object.
field(
:linkedResources,
:linked_resources,
[Decidim::Plans::ResourceLinkSubject],
method: :linked_resources,
description: "The linked resources for this plan.",
null: true
)

# These are the resources that are linked from other related objects to
# the plan.
field(
:linkingResources,
:linking_resources,
[Decidim::Plans::ResourceLinkSubject],
method: :linking_resources,
description: "The linking resources for this plan.",
null: true
)
Expand Down

0 comments on commit c69d70b

Please sign in to comment.