fga-eps-mds/2019.2-Vsign

View on GitHub
backend/app/graphql/queries/get_contract.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Queries
  class GetContract < BaseQuery
    description "Finds contract by token or id"
    
    argument :id, ID, required: true

    type Types::ContractType, null: true

    def resolve(id: nil)
      current_user = context[:current_user]
      current_user.contracts.find(id)
    end
  end
end