type.ex (3005B)
1 # Zenflows is designed to implement the Valueflows vocabulary, 2 # written and maintained by srfsh <info@dyne.org>. 3 # Copyright (C) 2021-2023 Dyne.org foundation <foundation@dyne.org>. 4 # 5 # This program is free software: you can redistribute it and/or modify 6 # it under the terms of the GNU Affero General Public License as published by 7 # the Free Software Foundation, either version 3 of the License, or 8 # (at your option) any later version. 9 # 10 # This program is distributed in the hope that it will be useful, 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # GNU Affero General Public License for more details. 14 # 15 # You should have received a copy of the GNU Affero General Public License 16 # along with this program. If not, see <https://www.gnu.org/licenses/>. 17 18 defmodule Zenflows.VF.ProcessSpecification.Type do 19 @moduledoc false 20 21 use Absinthe.Schema.Notation 22 23 alias Zenflows.VF.ProcessSpecification.Resolv 24 25 @name """ 26 An informal or formal textual identifier for the process. Does not 27 imply uniqueness. 28 """ 29 @note "A textual description or comment." 30 31 @desc "Specifies the kind of process." 32 object :process_specification do 33 field :id, non_null(:id) 34 35 @desc @name 36 field :name, non_null(:string) 37 38 @desc @note 39 field :note, :string 40 end 41 42 input_object :process_specification_create_params do 43 @desc @name 44 field :name, non_null(:string) 45 46 @desc @note 47 field :note, :string 48 end 49 50 input_object :process_specification_update_params do 51 field :id, non_null(:id) 52 53 @desc @name 54 field :name, :string 55 56 @desc @note 57 field :note, :string 58 end 59 60 object :process_specification_response do 61 field :process_specification, non_null(:process_specification) 62 end 63 64 object :process_specification_edge do 65 field :cursor, non_null(:id) 66 field :node, non_null(:process_specification) 67 end 68 69 object :process_specification_connection do 70 field :page_info, non_null(:page_info) 71 field :edges, non_null(list_of(non_null(:process_specification_edge))) 72 end 73 74 object :query_process_specification do 75 field :process_specification, :process_specification do 76 arg :id, non_null(:id) 77 resolve &Resolv.process_specification/2 78 end 79 80 field :process_specifications, non_null(:process_specification_connection) do 81 arg :first, :integer 82 arg :after, :id 83 arg :last, :integer 84 arg :before, :id 85 resolve &Resolv.process_specifications/2 86 end 87 end 88 89 object :mutation_process_specification do 90 field :create_process_specification, non_null(:process_specification_response) do 91 arg :process_specification, non_null(:process_specification_create_params) 92 resolve &Resolv.create_process_specification/2 93 end 94 95 field :update_process_specification, non_null(:process_specification_response) do 96 arg :process_specification, non_null(:process_specification_update_params) 97 resolve &Resolv.update_process_specification/2 98 end 99 100 field :delete_process_specification, non_null(:boolean) do 101 arg :id, non_null(:id) 102 resolve &Resolv.delete_process_specification/2 103 end 104 end 105 end