Sha256: eaa7e8fd0908262a5af702db5ba96520c2f47697b0266f9a9454b52f4f210272
Contents?: true
Size: 568 Bytes
Versions: 4
Compression:
Stored size: 568 Bytes
Contents
module Mutations module Base::ArticleCategory class DeleteArticleCategory < BaseMutation field :article_category, Types::ArticleCategoryType, null: false argument :id, String, required: true def resolve(**args) _, data_id = SoulsApiSchema.from_global_id(args[:id]) article_category = ::ArticleCategory.find(data_id) article_category.update(is_deleted: true) { article_category: ::ArticleCategory.find(data_id) } rescue StandardError => e GraphQL::ExecutionError.new(e) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems