Skip to content

Commit 466f091

Browse files
graphql: enable ws socket in the app
Signed-off-by: Vincenzo Palazzo <[email protected]>
1 parent 8769295 commit 466f091

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/graphql_flutter/example/graphql_chat/lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Future<void> main() async {
1919
config: const SocketClientConfig(
2020
inactivityTimeout: Duration(seconds: 40),
2121
),
22-
subProtocol: SocketSubProtocol.graphqlTransportWs,
22+
subProtocol: SocketSubProtocol.graphqlWs,
2323
);
2424
final Link link = httpLink.split(
2525
(request) => request.isSubscription,
@@ -28,7 +28,7 @@ Future<void> main() async {
2828
);
2929
ValueNotifier<GraphQLClient> client = ValueNotifier(
3030
GraphQLClient(
31-
link: httpLink,
31+
link: link,
3232
// The default store is the InMemoryStore, which does NOT persist to disk
3333
cache: GraphQLCache(store: HiveStore()),
3434
),

packages/graphql_flutter/example/graphql_chat/lib/view/home/home_body.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ class HomeViewBody extends StatelessWidget {
8585
return Column(
8686
children: [
8787
Expanded(child: _buildScrollView(context: context)),
88+
Expanded(child: _buildUpdateScrollView(context: context)),
8889
],
8990
);
9091
}

0 commit comments

Comments
 (0)