Guest User

Untitled

a guest
Dec 10th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. module Types
  2. class UserType < Types::BaseObject
  3. implements GraphQL::Relay::Node.interface
  4.  
  5. field :id, ID, null: false
  6. field :notifications, NotificationType.connection_type, null: true
  7.  
  8. global_id_field :id
  9.  
  10.  
  11. def notifications
  12. object.notifications.tap { |o| o.read! }
  13. end
  14. end
  15. end
Add Comment
Please, Sign In to add comment