Sha256: 55e6a8d779921fa0a87c0415865c68569f7a4c0a5554bcbf26cd947113ee4ea2

Contents?: true

Size: 325 Bytes

Versions: 4

Compression:

Stored size: 325 Bytes

Contents

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

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