File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
packages/node_modules/overmind-graphql/src Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,13 @@ interface Subscription {
3333}
3434
3535type Http = {
36- url : string ;
36+ endpoint : string ;
3737 headers ?: ( ) => HttpHeaders ;
3838 options ?: Options ;
3939} ;
4040
4141type Ws = {
42- url : string ;
42+ endpoint : string ;
4343 params ?: ( ) => { [ key : string ] : string | number | boolean } ;
4444} ;
4545
@@ -112,32 +112,32 @@ export const graphql: <T extends Queries>(
112112 ? _http . options . headers
113113 : { } ;
114114
115- if ( _clients [ _http . url ] ) {
116- _clients [ _http . url ] . setHeaders ( headers ) ;
115+ if ( _clients [ _http . endpoint ] ) {
116+ _clients [ _http . endpoint ] . setHeaders ( headers ) ;
117117 } else {
118- _clients [ _http . url ] = new GraphQLClient ( _http . url , {
118+ _clients [ _http . endpoint ] = new GraphQLClient ( _http . endpoint , {
119119 ..._http . options ,
120120 headers,
121121 } ) ;
122122 }
123123
124- return _clients [ _http . url ] ;
124+ return _clients [ _http . endpoint ] ;
125125 }
126126
127127 return null ;
128128 }
129129
130130 function getWsClient ( ) : PhoenixSocket | null {
131131 if ( _ws ) {
132- if ( ! _wsClients [ _ws . url ] ) {
133- _wsClients [ _ws . url ] = withAbsintheSocket . create (
134- new PhoenixSocket ( _ws . url , {
132+ if ( ! _wsClients [ _ws . endpoint ] ) {
133+ _wsClients [ _ws . endpoint ] = withAbsintheSocket . create (
134+ new PhoenixSocket ( _ws . endpoint , {
135135 params : _ws . params ? _ws . params ( ) : undefined ,
136136 } )
137137 ) ;
138138 }
139139
140- return _wsClients [ _ws . url ] ;
140+ return _wsClients [ _ws . endpoint ] ;
141141 }
142142
143143 return null ;
You can’t perform that action at this time.
0 commit comments