hunk.code_window:   WS.createServerApp (_wseServer serverEnv) handlers ipAddress pendingConn
     where
       handlers =
         WS.WSHandlers
         -- Mask async exceptions during event processing to help maintain integrity of mutable vars:
         (\rid rh ip -> mask_ $ flip runReaderT serverEnv $ onConn rid rh ip)
         (\conn bs -> mask_ $ onMessage env authMode serverEnv conn bs)
         (mask_ . onClose (_wseLogger serverEnv) (_wseLiveQMap serverEnv))
   stopWSServerApp :: WSServerEnv -> IO ()
   stopWSServerApp wsEnv = WS.shutdown (_wseServer wsEnv)
hunk.labels: keep keep replace replace replace replace replace replace keep keep keep
hunk.after_edit:     handlers = WS.WSHandlers onConnHandler onMessageHandler onCloseHandler
       -- Mask async exceptions during event processing to help maintain integrity of mutable vars:
       onConnHandler rid rh ip = mask_ do
         liftIO $ EKG.Gauge.inc $ smWebsocketConnections serverMetrics
         flip runReaderT serverEnv $ onConn rid rh ip
       onMessageHandler conn bs = mask_ $ onMessage env authMode serverEnv conn bs
       onCloseHandler conn = mask_ do
         liftIO $ EKG.Gauge.dec $ smWebsocketConnections serverMetrics
         onClose (_wseLogger serverEnv) (_wseLiveQMap serverEnv) conn
  
hunk.file_path: server/src-lib/Hasura/GraphQL/Transport/WebSocket.hs
hunk.type: replace
file: type: bulk
  args:
  
  - type: run_sql
    args:
      sql: |
        CREATE TABLE public.authors (
          id serial NOT NULL PRIMARY KEY,
          name text NOT NULL
        );
        CREATE TABLE public.articles (
            id serial NOT NULL PRIMARY KEY,
            author_id integer NOT NULL REFERENCES public.authors(id),
            title text NOT NULL,
            body text NOT NULL
        );
  
  - args:
      name: authors
      schema: public
    type: track_table
  - args:
      name: articles
      schema: public
    type: track_table
  - args:
      delete:
        columns: '*'
      headers: []
      insert:
        columns: '*'
      name: articles
      retry_conf:
        interval_sec: 10
        num_retries: 0
        timeout_sec: 60
      table:
        name: articles
        schema: public
      update:
        columns:
        - author_id
        - body
        - id
        - title
      webhook: https://httpbin.org/post
    type: create_event_trigger
  