This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:async'; | |
import 'package:meta/meta.dart'; | |
import 'package:hasura_connect/hasura_connect.dart'; | |
import 'package:http/http.dart' as http; | |
// problem: | |
// when subscribing to`HasuraConnect.subscription`, a websocket connection is created on the first subscription | |
// call. The websocket connection is created only once with the initial subscription and the provided TokenInterceptor | |
// or headers. When the token expires during an active subscription, HasuraConnect doesn't stop the subscription, or try | |
// to reconnect with the latest token in in the TokenInterceptor nor does it throw an error. It'll keep calling `onRequest` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import( | |
"log" | |
"net/url" | |
"net/http" | |
"net/http/httputil" | |
) | |
func main() { |