ecoportal-api-graphql 1.3.14 → 1.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ai-assistance/projects/TODO.md +170 -118
- data/.ai-assistance/skills/ai-instructions/SKILL.md +48 -48
- data/.ai-assistance/skills/code-specs/SKILL.md +69 -69
- data/.ai-assistance/skills/gemini-assist/SKILL.md +63 -63
- data/.ai-assistance/skills/project-cycle/SKILL.md +177 -177
- data/.ai-assistance/skills/refactor/SKILL.md +62 -62
- data/.ai-assistance/skills/spec-generation/SKILL.md +72 -72
- data/.gitlab-ci.yml +64 -12
- data/CHANGELOG.md +60 -0
- data/changelog.d/fixed-mr51-payload-item-mismatches.md +17 -0
- data/lib/ecoportal/api/common/graphql/http_client.rb +6 -0
- data/lib/ecoportal/api/graphql/base/ai_summary_version.rb +17 -17
- data/lib/ecoportal/api/graphql/base/page/task.rb +24 -0
- data/lib/ecoportal/api/graphql/base/page.rb +17 -16
- data/lib/ecoportal/api/graphql/base/template.rb +35 -0
- data/lib/ecoportal/api/graphql/base.rb +2 -0
- data/lib/ecoportal/api/graphql/compat/response.rb +35 -35
- data/lib/ecoportal/api/graphql/file_upload/client.rb +21 -10
- data/lib/ecoportal/api/graphql/fragment/field_configuration.rb +38 -0
- data/lib/ecoportal/api/graphql/fragment/force.rb +14 -10
- data/lib/ecoportal/api/graphql/fragment/page_task.rb +39 -0
- data/lib/ecoportal/api/graphql/fragment/template.rb +51 -0
- data/lib/ecoportal/api/graphql/fragment.rb +3 -0
- data/lib/ecoportal/api/graphql/model/page/task.rb +16 -0
- data/lib/ecoportal/api/graphql/model/page.rb +16 -15
- data/lib/ecoportal/api/graphql/model/template.rb +15 -0
- data/lib/ecoportal/api/graphql/model.rb +2 -0
- data/lib/ecoportal/api/graphql/mutation/ai_summary/generate.rb +45 -45
- data/lib/ecoportal/api/graphql/mutation/ai_summary/submit_feedback.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page/approve_review_task.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page/batch_update_review_task.rb +38 -40
- data/lib/ecoportal/api/graphql/mutation/page/create_draft.rb +38 -40
- data/lib/ecoportal/api/graphql/mutation/page/delete_draft.rb +38 -40
- data/lib/ecoportal/api/graphql/mutation/page/execute_force_commands.rb +7 -7
- data/lib/ecoportal/api/graphql/mutation/page/execute_workflow_commands.rb +8 -7
- data/lib/ecoportal/api/graphql/mutation/page/publish_draft.rb +38 -40
- data/lib/ecoportal/api/graphql/mutation/page/reject_review_task.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page/restart_review_task.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page/undo_review_task.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/preset_view/destroy.rb +34 -35
- data/lib/ecoportal/api/graphql/mutation/register/destroy.rb +35 -35
- data/lib/ecoportal/api/graphql/mutation/smart_fill/generate.rb +36 -36
- data/lib/ecoportal/api/graphql/mutation/smart_fill/submit_feedback.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/smart_fill.rb +13 -13
- data/lib/ecoportal/api/graphql/mutation/template/create_related_page.rb +46 -46
- data/lib/ecoportal/api/graphql/mutation/template/destroy_related_page.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/template/update_information.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation.rb +20 -20
- data/lib/ecoportal/api/graphql/payload/ok_payload.rb +36 -21
- data/lib/ecoportal/api/graphql/payload/page/draft.rb +26 -13
- data/lib/ecoportal/api/graphql/payload/page/review_task.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/page/review_task_batch.rb +23 -0
- data/lib/ecoportal/api/graphql/payload/page.rb +20 -19
- data/lib/ecoportal/api/graphql/payload/preset_view.rb +15 -11
- data/lib/ecoportal/api/graphql/payload/register.rb +15 -11
- data/lib/ecoportal/api/graphql/payload/template/create_related_page.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/template/destroy_related_page.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/template/update_information.rb +1 -1
- data/lib/ecoportal/api/graphql/query/page_with_forces.rb +9 -3
- data/lib/ecoportal/api/graphql/query/pages_workflow_commands.rb +9 -3
- data/lib/ecoportal/api/graphql/query/register_preset_views.rb +78 -78
- data/lib/ecoportal/api/graphql.rb +9 -5
- data/lib/ecoportal/api/graphql_version.rb +1 -1
- data/tests/dump_schema.rb +88 -0
- data/tests/validate_queries.rb +34 -12
- metadata +11 -1
|
@@ -3,6 +3,17 @@ module Ecoportal
|
|
|
3
3
|
class GraphQL
|
|
4
4
|
class Fragment
|
|
5
5
|
# Fields for a Force object, including all bindings needed for scripting.
|
|
6
|
+
#
|
|
7
|
+
# `Force.bindings` is `[BindingInterface]` (verified in the backend:
|
|
8
|
+
# `app/graphql/types/force_type.rb` + `types/forces/binding_interface.rb`), so its common
|
|
9
|
+
# fields are selected directly on the interface — no per-member inline fragments needed.
|
|
10
|
+
#
|
|
11
|
+
# ★ The interface exposes ONLY `name` and `referenceId` (+ `reference` per concrete type):
|
|
12
|
+
# there is NO `id` on a binding. The previous selection asked for `id` inside
|
|
13
|
+
# `... on DataFieldBinding` / `... on SectionBinding`, which makes the whole query invalid.
|
|
14
|
+
# Read/write asymmetry to be aware of: `WorkflowEditBindingInput` / `removeBinding` DO
|
|
15
|
+
# require a binding `id`, so `Force::Binding#id` (and `BindingCollection#delete!`) has no
|
|
16
|
+
# readable source for it — tracked as a shape-asymmetry finding, not fixable client-side.
|
|
6
17
|
fragment :ForceFields, <<~GRAPHQL
|
|
7
18
|
fragment ForceFields on Force {
|
|
8
19
|
id
|
|
@@ -11,16 +22,9 @@ module Ecoportal
|
|
|
11
22
|
customScript
|
|
12
23
|
globalBindingIds
|
|
13
24
|
bindings {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
referenceId
|
|
18
|
-
}
|
|
19
|
-
... on SectionBinding {
|
|
20
|
-
id
|
|
21
|
-
name
|
|
22
|
-
referenceId
|
|
23
|
-
}
|
|
25
|
+
__typename
|
|
26
|
+
name
|
|
27
|
+
referenceId
|
|
24
28
|
}
|
|
25
29
|
}
|
|
26
30
|
GRAPHQL
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
class Fragment
|
|
5
|
+
# Fields of a page TASK (`TaskInterface`: CompletePage / InComment / ReviewPage).
|
|
6
|
+
#
|
|
7
|
+
# The review-task mutations (`approve/reject/restart/undoReviewPageTask`) return
|
|
8
|
+
# `item: TaskInterface` — NOT a page. They used to select `item { ...PageFields }`,
|
|
9
|
+
# which is invalid GraphQL ("Fragment PageFields on BasePageInterface can't be spread
|
|
10
|
+
# inside TaskInterface") and made every one of those mutations fail. The page the
|
|
11
|
+
# caller was after is reachable through `subject` (a `PageUnion`), so it is spread
|
|
12
|
+
# there — where `PageFields` is legal.
|
|
13
|
+
#
|
|
14
|
+
# Verified against the live schema (2026-07-30): TaskInterface exposes complete,
|
|
15
|
+
# completedAt, completedBy, completedByUser, createdAt, due, escalated, escalatedAt,
|
|
16
|
+
# escalationTimes, escalationsDetails, fromPublicTemplate, id, nextEscalationTime,
|
|
17
|
+
# overdue, relativeStatus, scheduledCallbacks, stageId, subject, taskNotes, users.
|
|
18
|
+
fragment :PageTaskFields, <<~GRAPHQL
|
|
19
|
+
fragment PageTaskFields on TaskInterface {
|
|
20
|
+
__typename
|
|
21
|
+
id
|
|
22
|
+
stageId
|
|
23
|
+
complete
|
|
24
|
+
overdue
|
|
25
|
+
escalated
|
|
26
|
+
relativeStatus
|
|
27
|
+
taskNotes
|
|
28
|
+
createdAt { dateTime }
|
|
29
|
+
completedAt { dateTime }
|
|
30
|
+
due { dateTime }
|
|
31
|
+
subject {
|
|
32
|
+
...PageFields
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
GRAPHQL
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
class Fragment
|
|
5
|
+
# `createTemplateRelatedPage` / `destroyTemplateRelatedPage` return
|
|
6
|
+
# `item: RelatedPages` — a related-pages CONFIG entry, not a page. They used to select
|
|
7
|
+
# `item { ...PageFields }` (invalid: "can't be spread inside RelatedPages"), which made
|
|
8
|
+
# both mutations fail.
|
|
9
|
+
#
|
|
10
|
+
# Verified against the live schema (2026-07-30): RelatedPages exposes filters
|
|
11
|
+
# (StoredEsFilter), hasInaccessibleVariables, id, pages (PreviewPageConnection),
|
|
12
|
+
# register (MinimalRegister), registerId, title. Only the scalars are selected here —
|
|
13
|
+
# `pages` is a connection and `filters`/`register` are objects needing their own
|
|
14
|
+
# selections; query them explicitly when needed.
|
|
15
|
+
fragment :TemplateRelatedPages, <<~GRAPHQL
|
|
16
|
+
fragment TemplateRelatedPages on RelatedPages {
|
|
17
|
+
id
|
|
18
|
+
title
|
|
19
|
+
registerId
|
|
20
|
+
hasInaccessibleVariables
|
|
21
|
+
}
|
|
22
|
+
GRAPHQL
|
|
23
|
+
|
|
24
|
+
# `updateTemplateInformation` returns `UpdateInformationPayload { item: Template }`.
|
|
25
|
+
# ★ NOTE the type asymmetry: elsewhere in this gem a "template" is a PAGE
|
|
26
|
+
# (`Query::Templates` and the other template payloads legitimately resolve to
|
|
27
|
+
# `Model::PageUnion`, and validate clean), but THIS mutation returns the narrow
|
|
28
|
+
# `Template` type — hence `item { ...PageFields }` was invalid ("can't be spread
|
|
29
|
+
# inside Template").
|
|
30
|
+
#
|
|
31
|
+
# Verified against the live schema (2026-07-30): Template exposes active,
|
|
32
|
+
# aiDescription, commands (connection), creatorEditable, creatorEnabled, creatorFlags,
|
|
33
|
+
# description, folders, id, public, publicConfig, templateContainerUid, templateType.
|
|
34
|
+
fragment :TemplateInformation, <<~GRAPHQL
|
|
35
|
+
fragment TemplateInformation on Template {
|
|
36
|
+
id
|
|
37
|
+
description
|
|
38
|
+
aiDescription
|
|
39
|
+
templateType
|
|
40
|
+
templateContainerUid
|
|
41
|
+
active
|
|
42
|
+
public
|
|
43
|
+
folders
|
|
44
|
+
creatorEnabled
|
|
45
|
+
creatorEditable
|
|
46
|
+
}
|
|
47
|
+
GRAPHQL
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -35,3 +35,6 @@ require_relative 'fragment/page'
|
|
|
35
35
|
require_relative 'fragment/pages'
|
|
36
36
|
require_relative 'fragment/force'
|
|
37
37
|
require_relative 'fragment/pages_workflow'
|
|
38
|
+
require_relative 'fragment/field_configuration'
|
|
39
|
+
require_relative 'fragment/page_task'
|
|
40
|
+
require_relative 'fragment/template'
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Model
|
|
5
|
+
module Page
|
|
6
|
+
# Concrete `Base::Page::Task` — adds the typed `subject` (the page the task belongs
|
|
7
|
+
# to), which the base class cannot declare because `Model::PageUnion` lives one layer
|
|
8
|
+
# up. Nullable: the caller may select the task without its subject.
|
|
9
|
+
class Task < Base::Page::Task
|
|
10
|
+
embeds_one :subject, klass: 'Ecoportal::API::GraphQL::Model::PageUnion', nullable: true
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Model
|
|
5
|
-
module Page
|
|
6
|
-
end
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
require_relative 'page/basic'
|
|
13
|
-
require_relative 'page/data_field'
|
|
14
|
-
require_relative 'page/section'
|
|
15
|
-
require_relative 'page/phased'
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Model
|
|
5
|
+
module Page
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
require_relative 'page/basic'
|
|
13
|
+
require_relative 'page/data_field'
|
|
14
|
+
require_relative 'page/section'
|
|
15
|
+
require_relative 'page/phased'
|
|
16
|
+
require_relative 'page/task'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Model
|
|
5
|
+
# Concrete counterparts of `Base::Template::*` (see there for the page-vs-Template
|
|
6
|
+
# type asymmetry). No extra wiring needed — both are flat, read-only models.
|
|
7
|
+
module Template
|
|
8
|
+
class Information < Base::Template::Information; end
|
|
9
|
+
|
|
10
|
+
class RelatedPages < Base::Template::RelatedPages; end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Mutation
|
|
5
|
-
module AiSummary
|
|
6
|
-
# Triggers AI summary generation for a page or stage.
|
|
7
|
-
# Returns an AiSummaryVersion with the generated text and token usage.
|
|
8
|
-
# Generation is synchronous — the response contains the result or an error.
|
|
9
|
-
#
|
|
10
|
-
# stageId is optional: omit for page-level summary, provide for stage-level.
|
|
11
|
-
class Generate < Logic::Mutation
|
|
12
|
-
field_name :generateAiSummary
|
|
13
|
-
|
|
14
|
-
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::AiSummaryGenerate'
|
|
15
|
-
|
|
16
|
-
private
|
|
17
|
-
|
|
18
|
-
def basic_block(&block)
|
|
19
|
-
payload_block = block || default_payload_block
|
|
20
|
-
proc {
|
|
21
|
-
mutation(pageId: :id!, stageId: :id) {
|
|
22
|
-
generateAiSummary(pageId: :pageId, stageId: :stageId, &payload_block)
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def default_payload_block
|
|
28
|
-
proc {
|
|
29
|
-
errors { details fullMessages }
|
|
30
|
-
item {
|
|
31
|
-
id
|
|
32
|
-
aiSummary
|
|
33
|
-
status
|
|
34
|
-
inputTokens
|
|
35
|
-
outputTokens
|
|
36
|
-
totalTokens
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Mutation
|
|
5
|
+
module AiSummary
|
|
6
|
+
# Triggers AI summary generation for a page or stage.
|
|
7
|
+
# Returns an AiSummaryVersion with the generated text and token usage.
|
|
8
|
+
# Generation is synchronous — the response contains the result or an error.
|
|
9
|
+
#
|
|
10
|
+
# stageId is optional: omit for page-level summary, provide for stage-level.
|
|
11
|
+
class Generate < Logic::Mutation
|
|
12
|
+
field_name :generateAiSummary
|
|
13
|
+
|
|
14
|
+
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::AiSummaryGenerate'
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
|
|
18
|
+
def basic_block(&block)
|
|
19
|
+
payload_block = block || default_payload_block
|
|
20
|
+
proc {
|
|
21
|
+
mutation(pageId: :id!, stageId: :id) {
|
|
22
|
+
generateAiSummary(pageId: :pageId, stageId: :stageId, &payload_block)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def default_payload_block
|
|
28
|
+
proc {
|
|
29
|
+
errors { details fullMessages }
|
|
30
|
+
item {
|
|
31
|
+
id
|
|
32
|
+
aiSummary
|
|
33
|
+
status
|
|
34
|
+
inputTokens
|
|
35
|
+
outputTokens
|
|
36
|
+
totalTokens
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Mutation
|
|
5
|
-
module AiSummary
|
|
6
|
-
# Submit a thumbs-up / thumbs-down rating on an AI summary version.
|
|
7
|
-
# sentiment: "THUMBS_UP" | "THUMBS_DOWN"
|
|
8
|
-
# aiSummaryVersionId: returned from generateAiSummary.item.id
|
|
9
|
-
class SubmitFeedback < Logic::Mutation
|
|
10
|
-
field_name :submitAiSummaryFeedback
|
|
11
|
-
|
|
12
|
-
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::OkPayload'
|
|
13
|
-
|
|
14
|
-
private
|
|
15
|
-
|
|
16
|
-
def basic_block(&block)
|
|
17
|
-
payload_block = block || default_payload_block
|
|
18
|
-
proc {
|
|
19
|
-
mutation(aiSummaryVersionId: :id!, sentiment: :AiSummarySentimentEnum!) {
|
|
20
|
-
submitAiSummaryFeedback(
|
|
21
|
-
aiSummaryVersionId: :aiSummaryVersionId,
|
|
22
|
-
sentiment: :sentiment,
|
|
23
|
-
&payload_block
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def default_payload_block
|
|
30
|
-
proc {
|
|
31
|
-
ok
|
|
32
|
-
errors { details fullMessages }
|
|
33
|
-
}
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Mutation
|
|
5
|
+
module AiSummary
|
|
6
|
+
# Submit a thumbs-up / thumbs-down rating on an AI summary version.
|
|
7
|
+
# sentiment: "THUMBS_UP" | "THUMBS_DOWN"
|
|
8
|
+
# aiSummaryVersionId: returned from generateAiSummary.item.id
|
|
9
|
+
class SubmitFeedback < Logic::Mutation
|
|
10
|
+
field_name :submitAiSummaryFeedback
|
|
11
|
+
|
|
12
|
+
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::OkPayload'
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def basic_block(&block)
|
|
17
|
+
payload_block = block || default_payload_block
|
|
18
|
+
proc {
|
|
19
|
+
mutation(aiSummaryVersionId: :id!, sentiment: :AiSummarySentimentEnum!) {
|
|
20
|
+
submitAiSummaryFeedback(
|
|
21
|
+
aiSummaryVersionId: :aiSummaryVersionId,
|
|
22
|
+
sentiment: :sentiment,
|
|
23
|
+
&payload_block
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def default_payload_block
|
|
30
|
+
proc {
|
|
31
|
+
ok
|
|
32
|
+
errors { details fullMessages }
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Mutation
|
|
5
|
-
module Page
|
|
6
|
-
class ApproveReviewTask < Logic::Mutation
|
|
7
|
-
field_name :approveReviewPageTask
|
|
8
|
-
|
|
9
|
-
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::Page::ReviewTask'
|
|
10
|
-
class_resolver :input_class, 'Ecoportal::API::GraphQL::Input::Page::ReviewTask'
|
|
11
|
-
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
def basic_block(&block)
|
|
15
|
-
payload_block = block || default_payload_block
|
|
16
|
-
proc {
|
|
17
|
-
mutation(input: :ApproveReviewPageTaskInput!) {
|
|
18
|
-
approveReviewPageTask(input: :input, &payload_block)
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def default_payload_block
|
|
24
|
-
proc {
|
|
25
|
-
clientMutationId
|
|
26
|
-
errors {
|
|
27
|
-
details
|
|
28
|
-
fullMessages
|
|
29
|
-
}
|
|
30
|
-
item {
|
|
31
|
-
spread :
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Mutation
|
|
5
|
+
module Page
|
|
6
|
+
class ApproveReviewTask < Logic::Mutation
|
|
7
|
+
field_name :approveReviewPageTask
|
|
8
|
+
|
|
9
|
+
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::Page::ReviewTask'
|
|
10
|
+
class_resolver :input_class, 'Ecoportal::API::GraphQL::Input::Page::ReviewTask'
|
|
11
|
+
|
|
12
|
+
private
|
|
13
|
+
|
|
14
|
+
def basic_block(&block)
|
|
15
|
+
payload_block = block || default_payload_block
|
|
16
|
+
proc {
|
|
17
|
+
mutation(input: :ApproveReviewPageTaskInput!) {
|
|
18
|
+
approveReviewPageTask(input: :input, &payload_block)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def default_payload_block
|
|
24
|
+
proc {
|
|
25
|
+
clientMutationId
|
|
26
|
+
errors {
|
|
27
|
+
details
|
|
28
|
+
fullMessages
|
|
29
|
+
}
|
|
30
|
+
item {
|
|
31
|
+
spread :PageTaskFields
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -1,40 +1,38 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Mutation
|
|
5
|
-
module Page
|
|
6
|
-
class BatchUpdateReviewTask < Logic::Mutation
|
|
7
|
-
field_name :batchUpdateReviewPageTask
|
|
8
|
-
|
|
9
|
-
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::Page::
|
|
10
|
-
class_resolver :input_class, 'Ecoportal::API::GraphQL::Input::Page::ReviewTask'
|
|
11
|
-
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
def basic_block(&block)
|
|
15
|
-
payload_block = block || default_payload_block
|
|
16
|
-
proc {
|
|
17
|
-
mutation(input: :BatchUpdateReviewPageTaskInput!) {
|
|
18
|
-
batchUpdateReviewPageTask(input: :input, &payload_block)
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def default_payload_block
|
|
24
|
-
proc {
|
|
25
|
-
clientMutationId
|
|
26
|
-
errors {
|
|
27
|
-
details
|
|
28
|
-
fullMessages
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
end
|
|
40
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Mutation
|
|
5
|
+
module Page
|
|
6
|
+
class BatchUpdateReviewTask < Logic::Mutation
|
|
7
|
+
field_name :batchUpdateReviewPageTask
|
|
8
|
+
|
|
9
|
+
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::Page::ReviewTaskBatch'
|
|
10
|
+
class_resolver :input_class, 'Ecoportal::API::GraphQL::Input::Page::ReviewTask'
|
|
11
|
+
|
|
12
|
+
private
|
|
13
|
+
|
|
14
|
+
def basic_block(&block)
|
|
15
|
+
payload_block = block || default_payload_block
|
|
16
|
+
proc {
|
|
17
|
+
mutation(input: :BatchUpdateReviewPageTaskInput!) {
|
|
18
|
+
batchUpdateReviewPageTask(input: :input, &payload_block)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def default_payload_block
|
|
24
|
+
proc {
|
|
25
|
+
clientMutationId
|
|
26
|
+
errors {
|
|
27
|
+
details
|
|
28
|
+
fullMessages
|
|
29
|
+
}
|
|
30
|
+
count
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -1,40 +1,38 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Mutation
|
|
5
|
-
module Page
|
|
6
|
-
class CreateDraft < Logic::Mutation
|
|
7
|
-
field_name :createPageDraft
|
|
8
|
-
|
|
9
|
-
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::Page::Draft'
|
|
10
|
-
class_resolver :input_class, 'Ecoportal::API::GraphQL::Input::Page::CreateDraft'
|
|
11
|
-
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
def basic_block(&block)
|
|
15
|
-
payload_block = block || default_payload_block
|
|
16
|
-
proc {
|
|
17
|
-
mutation(input: :CreatePageDraftInput!) {
|
|
18
|
-
createPageDraft(input: :input, &payload_block)
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def default_payload_block
|
|
24
|
-
proc {
|
|
25
|
-
clientMutationId
|
|
26
|
-
errors {
|
|
27
|
-
details
|
|
28
|
-
fullMessages
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
end
|
|
40
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Mutation
|
|
5
|
+
module Page
|
|
6
|
+
class CreateDraft < Logic::Mutation
|
|
7
|
+
field_name :createPageDraft
|
|
8
|
+
|
|
9
|
+
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::Page::Draft'
|
|
10
|
+
class_resolver :input_class, 'Ecoportal::API::GraphQL::Input::Page::CreateDraft'
|
|
11
|
+
|
|
12
|
+
private
|
|
13
|
+
|
|
14
|
+
def basic_block(&block)
|
|
15
|
+
payload_block = block || default_payload_block
|
|
16
|
+
proc {
|
|
17
|
+
mutation(input: :CreatePageDraftInput!) {
|
|
18
|
+
createPageDraft(input: :input, &payload_block)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def default_payload_block
|
|
24
|
+
proc {
|
|
25
|
+
clientMutationId
|
|
26
|
+
errors {
|
|
27
|
+
details
|
|
28
|
+
fullMessages
|
|
29
|
+
}
|
|
30
|
+
id
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|