Sha256: a414b323e8391e76891951e096969e1be883bdb3b3d1e1e4b1a3446087b847a8

Contents?: true

Size: 334 Bytes

Versions: 4

Compression:

Stored size: 334 Bytes

Contents

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

    def resolve(**args)
      _, data_id = SoulsApiSchema.from_global_id(args[:id])
      ::Article.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.rb
souls-0.24.1 apps/api/app/graphql/queries/article.rb
souls-0.22.8 hoy/app/graphql/queries/article.rb
souls-0.22.7 hoy/app/graphql/queries/article.rb