Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Types
- class UserType < Types::BaseObject
- implements GraphQL::Relay::Node.interface
- field :id, ID, null: false
- field :notifications, NotificationType.connection_type, null: true
- global_id_field :id
- def notifications
- object.notifications.tap { |o| o.read! }
- end
- end
- end
Add Comment
Please, Sign In to add comment