File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
packages/app/src/app/overmind Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ type Http = {
3838 options ?: Options ;
3939} ;
4040
41- type Ws = PhoenixSocket | null ;
41+ type Ws = ( ( ) => PhoenixSocket ) | null ;
4242
4343type Queries = {
4444 queries ?: {
@@ -126,7 +126,7 @@ export const graphql: <T extends Queries>(
126126 let wsClient : PhoenixSocket | null = null ;
127127 function getWsClient ( ) : PhoenixSocket | null {
128128 if ( _ws && ! wsClient ) {
129- wsClient = withAbsintheSocket . create ( _ws ) ;
129+ wsClient = withAbsintheSocket . create ( _ws ( ) ) ;
130130 return wsClient ;
131131 }
132132
Original file line number Diff line number Diff line change @@ -33,9 +33,7 @@ export const onInitialize: OnInitialize = async (
3333 Authorization : `Bearer ${ state . jwt } ` ,
3434 } ) ,
3535 } ,
36- // TODO(@christianalfoni): we need to make this dynamic, but overmind devtools can't serialize a socket with one channel.
37- // Because of this the app crashes if we want to provide it with a function
38- effects . jwt . get ( ) ? effects . live . getSocket ( ) : null
36+ ( ) => effects . live . getSocket ( )
3937 ) ;
4038
4139 effects . notifications . initialize ( {
You can’t perform that action at this time.
0 commit comments