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
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Mutation
|
|
5
|
-
module SmartFill
|
|
6
|
-
# Submit a rating on a SmartFill generation.
|
|
7
|
-
# value: "THUMBS_UP" | "THUMBS_DOWN" (BinaryRatingEnum)
|
|
8
|
-
class SubmitFeedback < Logic::Mutation
|
|
9
|
-
field_name :smartFillSubmitFeedback
|
|
10
|
-
|
|
11
|
-
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::OkPayload'
|
|
12
|
-
|
|
13
|
-
private
|
|
14
|
-
|
|
15
|
-
def basic_block(&block)
|
|
16
|
-
payload_block = block || default_payload_block
|
|
17
|
-
proc {
|
|
18
|
-
mutation(pageId: :id!, dataFieldId: :id!, value: :BinaryRatingEnum!) {
|
|
19
|
-
smartFillSubmitFeedback(
|
|
20
|
-
pageId: :pageId,
|
|
21
|
-
dataFieldId: :dataFieldId,
|
|
22
|
-
value: :value,
|
|
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 SmartFill
|
|
6
|
+
# Submit a rating on a SmartFill generation.
|
|
7
|
+
# value: "THUMBS_UP" | "THUMBS_DOWN" (BinaryRatingEnum)
|
|
8
|
+
class SubmitFeedback < Logic::Mutation
|
|
9
|
+
field_name :smartFillSubmitFeedback
|
|
10
|
+
|
|
11
|
+
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::OkPayload'
|
|
12
|
+
|
|
13
|
+
private
|
|
14
|
+
|
|
15
|
+
def basic_block(&block)
|
|
16
|
+
payload_block = block || default_payload_block
|
|
17
|
+
proc {
|
|
18
|
+
mutation(pageId: :id!, dataFieldId: :id!, value: :BinaryRatingEnum!) {
|
|
19
|
+
smartFillSubmitFeedback(
|
|
20
|
+
pageId: :pageId,
|
|
21
|
+
dataFieldId: :dataFieldId,
|
|
22
|
+
value: :value,
|
|
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,13 +1,13 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Mutation
|
|
5
|
-
module SmartFill
|
|
6
|
-
end
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
require_relative 'smart_fill/generate'
|
|
13
|
-
require_relative 'smart_fill/submit_feedback'
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Mutation
|
|
5
|
+
module SmartFill
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
require_relative 'smart_fill/generate'
|
|
13
|
+
require_relative 'smart_fill/submit_feedback'
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Mutation
|
|
5
|
-
module Template
|
|
6
|
-
class CreateRelatedPage < Logic::Mutation
|
|
7
|
-
SCHEMA_VERSION = '20260605'.freeze
|
|
8
|
-
|
|
9
|
-
field_name :createTemplateRelatedPage
|
|
10
|
-
|
|
11
|
-
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::Template::CreateRelatedPage'
|
|
12
|
-
|
|
13
|
-
def query(template_id:, title:, register_id:, patch_ver:, filters: nil, **kargs, &block)
|
|
14
|
-
input = {
|
|
15
|
-
templateId: template_id,
|
|
16
|
-
title: title,
|
|
17
|
-
registerId: register_id,
|
|
18
|
-
patchVer: patch_ver
|
|
19
|
-
}
|
|
20
|
-
input[:filters] = filters if filters
|
|
21
|
-
super(input: input, **kargs, &block)
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
def basic_block(&block)
|
|
27
|
-
payload_block = block || default_payload_block
|
|
28
|
-
proc {
|
|
29
|
-
mutation(input: :CreateTemplateRelatedPageInput!) {
|
|
30
|
-
createTemplateRelatedPage(input: :input, &payload_block)
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def default_payload_block
|
|
36
|
-
proc {
|
|
37
|
-
item { spread :
|
|
38
|
-
errors { details fullMessages }
|
|
39
|
-
}
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Mutation
|
|
5
|
+
module Template
|
|
6
|
+
class CreateRelatedPage < Logic::Mutation
|
|
7
|
+
SCHEMA_VERSION = '20260605'.freeze
|
|
8
|
+
|
|
9
|
+
field_name :createTemplateRelatedPage
|
|
10
|
+
|
|
11
|
+
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::Template::CreateRelatedPage'
|
|
12
|
+
|
|
13
|
+
def query(template_id:, title:, register_id:, patch_ver:, filters: nil, **kargs, &block)
|
|
14
|
+
input = {
|
|
15
|
+
templateId: template_id,
|
|
16
|
+
title: title,
|
|
17
|
+
registerId: register_id,
|
|
18
|
+
patchVer: patch_ver
|
|
19
|
+
}
|
|
20
|
+
input[:filters] = filters if filters
|
|
21
|
+
super(input: input, **kargs, &block)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
private
|
|
25
|
+
|
|
26
|
+
def basic_block(&block)
|
|
27
|
+
payload_block = block || default_payload_block
|
|
28
|
+
proc {
|
|
29
|
+
mutation(input: :CreateTemplateRelatedPageInput!) {
|
|
30
|
+
createTemplateRelatedPage(input: :input, &payload_block)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def default_payload_block
|
|
36
|
+
proc {
|
|
37
|
+
item { spread :TemplateRelatedPages }
|
|
38
|
+
errors { details fullMessages }
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Mutation
|
|
5
|
-
end
|
|
6
|
-
end
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
require_relative 'mutation/location_structure'
|
|
11
|
-
require_relative 'mutation/contractor_entity'
|
|
12
|
-
require_relative 'mutation/action'
|
|
13
|
-
require_relative 'mutation/page'
|
|
14
|
-
require_relative 'mutation/register'
|
|
15
|
-
require_relative 'mutation/preset_view'
|
|
16
|
-
|
|
17
|
-
require_relative 'mutation/ai_summary'
|
|
18
|
-
require_relative 'mutation/smart_fill'
|
|
19
|
-
require_relative 'mutation/kickstand'
|
|
20
|
-
require_relative 'mutation/template'
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Mutation
|
|
5
|
+
end
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
require_relative 'mutation/location_structure'
|
|
11
|
+
require_relative 'mutation/contractor_entity'
|
|
12
|
+
require_relative 'mutation/action'
|
|
13
|
+
require_relative 'mutation/page'
|
|
14
|
+
require_relative 'mutation/register'
|
|
15
|
+
require_relative 'mutation/preset_view'
|
|
16
|
+
|
|
17
|
+
require_relative 'mutation/ai_summary'
|
|
18
|
+
require_relative 'mutation/smart_fill'
|
|
19
|
+
require_relative 'mutation/kickstand'
|
|
20
|
+
require_relative 'mutation/template'
|
|
@@ -1,21 +1,36 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Payload
|
|
5
|
-
# Payload for mutations that return { ok: Boolean, errors } instead of an item.
|
|
6
|
-
# Used by
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Payload
|
|
5
|
+
# Payload for mutations that return `{ ok: Boolean, errors }` instead of an item.
|
|
6
|
+
# Used by `submitPageAiSummaryFeedback` (`SubmitFeedbackPayload`).
|
|
7
|
+
#
|
|
8
|
+
# The `smartFillGenerate` / `smartFillSubmitFeedback` users named here before 2026-07-30
|
|
9
|
+
# never existed in the schema — see the CHANGELOG entry that removed them.
|
|
10
|
+
class OkPayload < Logic::BaseModel
|
|
11
|
+
passboolean :ok
|
|
12
|
+
|
|
13
|
+
# The mutations select `errors`, so model it: without this the response contract
|
|
14
|
+
# (`success?`/`error?`/`error_doc`) reported success on a payload that carried errors.
|
|
15
|
+
embeds_one :errors, klass: Error::ValidationErrors, nullable: true
|
|
16
|
+
|
|
17
|
+
def success?
|
|
18
|
+
!!ok && !error?
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def error?
|
|
22
|
+
return false if errors.nil?
|
|
23
|
+
|
|
24
|
+
!errors.empty?
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def error_doc
|
|
28
|
+
return unless (err_doc = errors&.doc)
|
|
29
|
+
|
|
30
|
+
{ errors: err_doc }
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -1,13 +1,26 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Payload
|
|
5
|
-
module Page
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Payload
|
|
5
|
+
module Page
|
|
6
|
+
# Payload of the three draft mutations. ★ None of their schema payload types has an
|
|
7
|
+
# `item` (verified against the live schema 2026-07-30) — they return scalars:
|
|
8
|
+
# createPageDraft -> CreatePageDraftPayload { id } the new draft's page id
|
|
9
|
+
# deleteDraftPage -> DeleteDraftPagePayload { ok }
|
|
10
|
+
# publishDraftPage -> PublishDraftPagePayload { ok }
|
|
11
|
+
# All three used to select `item { ...PageFields }`, which made them invalid documents.
|
|
12
|
+
#
|
|
13
|
+
# `item` stays inherited from `Logic::Payload` for interface compatibility, but with no
|
|
14
|
+
# `item` in the response it materialises a HOLLOW model (all fields nil) rather than
|
|
15
|
+
# returning nil — read `id` / `ok` instead.
|
|
16
|
+
class Draft < Logic::Payload
|
|
17
|
+
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::PageUnion'
|
|
18
|
+
|
|
19
|
+
passkey :id
|
|
20
|
+
passboolean :ok
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Payload
|
|
5
|
-
module Page
|
|
6
|
-
class ReviewTask < Logic::Payload
|
|
7
|
-
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::
|
|
8
|
-
end
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Payload
|
|
5
|
+
module Page
|
|
6
|
+
class ReviewTask < Logic::Payload
|
|
7
|
+
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::Page::Task'
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Payload
|
|
5
|
+
module Page
|
|
6
|
+
# Payload of `batchUpdateReviewPageTask`. ★ Distinct from `Payload::Page::ReviewTask`:
|
|
7
|
+
# `BatchUpdateReviewPageTaskPayload` has NO `item` — it returns `count` (how many tasks
|
|
8
|
+
# were updated), verified against the live schema 2026-07-30. The mutation previously
|
|
9
|
+
# shared `Payload::Page::ReviewTask` and selected `item { ...PageFields }`, which made
|
|
10
|
+
# the document invalid.
|
|
11
|
+
class ReviewTaskBatch < Logic::Payload
|
|
12
|
+
# UNUSED: this payload has no `item`. A class must still be resolvable because
|
|
13
|
+
# `Logic::Payload`'s inherited `embeds_one :item` materialises a hollow model, and
|
|
14
|
+
# the default `GenericItem` raises by design.
|
|
15
|
+
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::PageUnion'
|
|
16
|
+
|
|
17
|
+
passthrough :count
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Payload
|
|
5
|
-
module Page
|
|
6
|
-
end
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
require_relative 'page/update'
|
|
13
|
-
require_relative 'page/archive'
|
|
14
|
-
require_relative 'page/unarchive'
|
|
15
|
-
require_relative 'page/build_from_template'
|
|
16
|
-
require_relative 'page/create_from_template'
|
|
17
|
-
require_relative 'page/draft'
|
|
18
|
-
require_relative 'page/review_task'
|
|
19
|
-
require_relative 'page/
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Payload
|
|
5
|
+
module Page
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
require_relative 'page/update'
|
|
13
|
+
require_relative 'page/archive'
|
|
14
|
+
require_relative 'page/unarchive'
|
|
15
|
+
require_relative 'page/build_from_template'
|
|
16
|
+
require_relative 'page/create_from_template'
|
|
17
|
+
require_relative 'page/draft'
|
|
18
|
+
require_relative 'page/review_task'
|
|
19
|
+
require_relative 'page/review_task_batch'
|
|
20
|
+
require_relative 'page/update_variable_bindings'
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Payload
|
|
5
|
-
class PresetView < Logic::Payload
|
|
6
|
-
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::PresetView'
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Payload
|
|
5
|
+
class PresetView < Logic::Payload
|
|
6
|
+
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::PresetView'
|
|
7
|
+
|
|
8
|
+
# `destroyPresetView` returns DestroyPresetViewPayload { clientMutationId errors }
|
|
9
|
+
# only — no `item`, not even `ok` (verified against the live schema 2026-07-30).
|
|
10
|
+
# create/update DO return `item: PresetView`.
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Payload
|
|
5
|
-
class Register < Logic::Payload
|
|
6
|
-
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::Register'
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Payload
|
|
5
|
+
class Register < Logic::Payload
|
|
6
|
+
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::Register'
|
|
7
|
+
|
|
8
|
+
# `destroyRegister` returns DestroyRegisterPayload { ok } — no `item` (verified
|
|
9
|
+
# against the live schema 2026-07-30). create/update DO return `item: Register`.
|
|
10
|
+
passboolean :ok
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -4,7 +4,7 @@ module Ecoportal
|
|
|
4
4
|
module Payload
|
|
5
5
|
module Template
|
|
6
6
|
class CreateRelatedPage < Logic::Payload
|
|
7
|
-
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::
|
|
7
|
+
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::Template::RelatedPages'
|
|
8
8
|
end
|
|
9
9
|
end
|
|
10
10
|
end
|
|
@@ -4,7 +4,7 @@ module Ecoportal
|
|
|
4
4
|
module Payload
|
|
5
5
|
module Template
|
|
6
6
|
class DestroyRelatedPage < Logic::Payload
|
|
7
|
-
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::
|
|
7
|
+
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::Template::RelatedPages'
|
|
8
8
|
end
|
|
9
9
|
end
|
|
10
10
|
end
|
|
@@ -4,7 +4,7 @@ module Ecoportal
|
|
|
4
4
|
module Payload
|
|
5
5
|
module Template
|
|
6
6
|
class UpdateInformation < Logic::Payload
|
|
7
|
-
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::
|
|
7
|
+
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::Template::Information'
|
|
8
8
|
end
|
|
9
9
|
end
|
|
10
10
|
end
|
|
@@ -28,12 +28,18 @@ module Ecoportal
|
|
|
28
28
|
}
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
+
# `currentOrganization.page(id:)` returns a PageUnion — selecting `forces` on it
|
|
32
|
+
# directly is invalid GraphQL ("Selections can't be made directly on unions").
|
|
33
|
+
# `forces` lives on BasePageInterface (which every union member implements), so it
|
|
34
|
+
# goes through an inline type condition, same as `PageFields` does.
|
|
31
35
|
def default_block
|
|
32
36
|
proc {
|
|
33
37
|
spread :PageFields
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
spread on: :BasePageInterface do
|
|
39
|
+
forces {
|
|
40
|
+
spread :ForceFields
|
|
41
|
+
}
|
|
42
|
+
end
|
|
37
43
|
}
|
|
38
44
|
end
|
|
39
45
|
end
|
|
@@ -25,15 +25,21 @@ module Ecoportal
|
|
|
25
25
|
|
|
26
26
|
private
|
|
27
27
|
|
|
28
|
+
# `page(id:)` returns a PageUnion — selecting `workflow` on it directly is invalid
|
|
29
|
+
# GraphQL ("Selections can't be made directly on unions"). `workflow` lives on
|
|
30
|
+
# BasePageInterface, so it goes through an inline type condition. The response shape
|
|
31
|
+
# is unchanged by the type condition, so `#path` still resolves the connection.
|
|
28
32
|
def basic_block(&block)
|
|
29
33
|
connection_block = block || default_connection_block
|
|
30
34
|
proc {
|
|
31
35
|
query(id: :id!, after: :string, before: :string, first: :int, last: :int) {
|
|
32
36
|
currentOrganization {
|
|
33
37
|
page(id: :id) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
spread on: :BasePageInterface do
|
|
39
|
+
workflow {
|
|
40
|
+
commands(after: :after, before: :before, first: :first, last: :last, &connection_block)
|
|
41
|
+
}
|
|
42
|
+
end
|
|
37
43
|
}
|
|
38
44
|
}
|
|
39
45
|
}
|