Skip to content

Commit 4fa6dd6

Browse files
fix(graphql): bump uuid dependency to ^4.0.0
1 parent 2c1601a commit 4fa6dd6

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

packages/graphql/lib/src/links/websocket_link/websocket_client.dart

+5-6
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ import 'package:graphql/src/utilities/platform.dart';
1010
import 'package:meta/meta.dart';
1111
import 'package:rxdart/rxdart.dart';
1212
import 'package:stream_channel/stream_channel.dart';
13+
import 'package:uuid/data.dart';
14+
import 'package:uuid/rng.dart';
1315
import 'package:uuid/uuid.dart';
14-
import 'package:uuid/uuid_util.dart';
1516
import 'package:web_socket_channel/status.dart' as ws_status;
1617
import 'package:web_socket_channel/web_socket_channel.dart';
1718

@@ -26,7 +27,7 @@ typedef WebSocketConnect = FutureOr<WebSocketChannel> Function(
2627
);
2728

2829
// create uuid generator
29-
final _uuid = Uuid(options: {'grng': UuidUtil.cryptoRNG});
30+
final _uuid = Uuid(goptions: GlobalOptions(CryptoRNG()));
3031

3132
class SubscriptionListener {
3233
Function callback;
@@ -472,10 +473,8 @@ class SocketClient {
472473
final bool waitForConnection,
473474
) {
474475
final String id = _uuid.v4(
475-
options: {
476-
'random': randomBytesForUuid,
477-
},
478-
).toString();
476+
config: V4Options(randomBytesForUuid, null),
477+
);
479478
final StreamController<Response> response = StreamController<Response>();
480479
StreamSubscription<SocketConnectionState>? sub;
481480
final bool addTimeout =

packages/graphql/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies:
2121
web_socket_channel: ^2.3.0
2222
stream_channel: ^2.1.0
2323
rxdart: ^0.27.1
24-
uuid: ^3.0.1
24+
uuid: ^4.0.0
2525

2626
dev_dependencies:
2727
async: ^2.5.0

0 commit comments

Comments
 (0)