blob: 2f5ce5db54a1d104849635b8625aeefebb0db860 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# frozen_string_literal: true
module Mutations
module Pages
class MarkOnboardingComplete < Base
graphql_name 'PagesMarkOnboardingComplete'
field :onboarding_complete,
Boolean,
null: false,
description: "Indicates the new onboarding_complete state of the project's Pages metadata."
authorize :admin_project
def resolve(project_path:)
project = authorized_find!(project_path)
project.mark_pages_onboarding_complete
{
onboarding_complete: project.pages_metadatum.onboarding_complete,
errors: errors_on_object(project)
}
end
end
end
end
|