Files
fl-query/packages/fl_query/lib/src/utilities/platform_html.dart
T
2022-02-07 00:11:15 +06:00

14 lines
490 B
Dart

import 'package:fl_query/src/links/websocket_link/websocket_client.dart';
import 'package:web_socket_channel/web_socket_channel.dart';
Future<WebSocketChannel> defaultConnectPlatform(
Uri uri, Iterable<String>? protocols,
{Map<String, dynamic>? headers}) async {
if (headers != null) {
print("The headers on the web are not supported");
}
final webSocketChannel =
await WebSocketChannel.connect(uri, protocols: protocols);
return webSocketChannel.forGraphQL();
}