File tree Expand file tree Collapse file tree 6 files changed +13
-28
lines changed
1-execute-query-mutation/src Expand file tree Collapse file tree 6 files changed +13
-28
lines changed Original file line number Diff line number Diff line change @@ -193,7 +193,7 @@ let debugExchange = (Exchanges.{forward}) =>
193193
194194let client =
195195 Client.make(
196- ~url="https://formidadog-ql.now.sh ",
196+ ~url="https://my-graphql-endpoint.com/graphql ",
197197 ~exchanges=[|
198198 debugExchange,
199199 Exchanges.dedupExchange,
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ let make = () => {
1010 ~padding= "20px" ,
1111 () ,
1212 )}>
13- <ColdStart />
1413 <Previewer />
1514 </div >;
1615};
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11open ReasonUrql ;
22
3- let client = Client . make(~url= "https://formidadog-ql.now.sh" , () );
3+ let client =
4+ Client . make(~url= "https://formidadog-ql.netlify.app/graphql" , () );
45
56module GetAllDogs = [%graphql
67 {|
@@ -58,29 +59,25 @@ let make = () => {
5859 );
5960
6061 let executeQuery = () => {
61- Client . query (
62+ Client . executeQuery (
6263 ~client,
6364 ~request= queryRequest,
6465 ~requestPolicy= ` CacheAndNetwork ,
6566 () ,
6667 )
67- |> Js . Promise . then_( data =>
68+ |> Wonka . subscribe((. data) =>
6869 switch (Client . (data. response)) {
6970 | Data (d ) =>
7071 switch (Js . Json . stringifyAny(d)) {
71- | Some (s ) =>
72- dispatch(SetQuery (s));
73- Js . Promise . resolve() ;
74- | None => Js . Promise . resolve()
72+ | Some (s ) => dispatch(SetQuery (s))
73+ | None => ()
7574 }
7675 | Error (e ) =>
7776 switch (Js . Json . stringifyAny(e)) {
78- | Some (s ) =>
79- dispatch(SetQuery (s));
80- Js . Promise . resolve() ;
81- | None => Js . Promise . resolve()
77+ | Some (s ) => dispatch(SetQuery (s))
78+ | None => ()
8279 }
83- | _ => Js . Promise . resolve ()
80+ | _ => ()
8481 }
8582 );
8683 };
Original file line number Diff line number Diff line change 11open ReasonUrql ;
22
3- let client = Client . make(~url= "https://formidadog-ql.now.sh" , () );
3+ let client =
4+ Client . make(~url= "https://formidadog-ql.netlify.app/graphql" , () );
45
56ReactDOMRe . renderToElementWithId(
67 <Context . Provider value= client> <Grid client /> </Context . Provider >,
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ let debugExchange = (Client.Exchanges.{forward}) =>
1616
1717let client =
1818 Client . make(
19- ~url= "https://formidadog-ql.now.sh " ,
19+ ~url= "https://formidadog-ql.netlify.app/graphql " ,
2020 ~exchanges= [| debugExchange, Client . Exchanges . fetchExchange|] ,
2121 () ,
2222 );
You can’t perform that action at this time.
0 commit comments