daily pastebin goal
40%
SHARE
TWEET

Untitled

a guest Dec 10th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top