Sha256: 011444632c54e18e70a9655cfef4c523db14bf66f87af1c546bd75029ff225e3

Contents?: true

Size: 358 Bytes

Versions: 4

Compression:

Stored size: 358 Bytes

Contents

module Queries
  class ArticleCategory < Queries::BaseQuery
    type Types::ArticleCategoryType, null: false
    argument :id, String, required: true

    def resolve(**args)
      _, data_id = SoulsApiSchema.from_global_id(args[:id])
      ::ArticleCategory.find(data_id)
    rescue StandardError => e
      GraphQL::ExecutionError.new(e)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
souls-0.24.2 apps/api/app/graphql/queries/article_category.rb
souls-0.24.1 apps/api/app/graphql/queries/article_category.rb
souls-0.22.8 hoy/app/graphql/queries/article_category.rb
souls-0.22.7 hoy/app/graphql/queries/article_category.rb