Sha256: bf436d6a37696c38bd5f40c3bb3ffbb0a6a99a2bca0c5d0f08e386b095a1155c
Contents?: true
Size: 557 Bytes
Versions: 11
Compression:
Stored size: 557 Bytes
Contents
# frozen_string_literal: true # Comment module Mutations module Admin class <%= class_name %>s::Update<%= class_name %> < BaseAdminMutation type Types::Admin::<%= class_name %>Type def resolve(id:, **args) <%= class_name.underscore %> = <%= class_name %>.find(id) if <%= class_name.underscore %>.update(args) <%= class_name.underscore %> else context.add_error(GraphQL::ExecutionError.new(<%= class_name.underscore %>.errors.full_messages.join(', '))) end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems