Add id argument to most collections on dossier
This commit is contained in:
parent
0bd8721776
commit
bb072ba9e9
6 changed files with 92 additions and 19 deletions
|
@ -13,6 +13,10 @@ class ApplicationRecord < ActiveRecord::Base
|
|||
raise ActiveRecord::RecordNotFound, e.message
|
||||
end
|
||||
|
||||
def self.id_from_typed_id(id)
|
||||
GraphQL::Schema::UniqueWithinType.decode(id)[1]
|
||||
end
|
||||
|
||||
def to_typed_id
|
||||
GraphQL::Schema::UniqueWithinType.encode(self.class.name, id)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue