-
Notifications
You must be signed in to change notification settings - Fork 0
Server #1
Comments
It used the server from official Apollo GraphQL example with a little bit of changes in schema. Unfortunately, as this project is abandoned, it doesn't work well with this server. You might need to download this repo fully and rewind back a few commits to work it together. Currently, I'm working on to make a new GraphQL client for ReasonML. I'm planning to write this example from scratch to make it work with that client. I'll tell you when that new example is finished. Until then, happy coding! |
Nice. No problems rewinding or whatever. Mostly reading your styles so just want to see what it looks like. Thank you for sharing that code, brother. I've already started reading through your ReasonQL repo. Having tooled around a bit in ReasonML and graphql, one thing I see that keeps coming up for me is the ability to make queries and just using the returned data as opposed to rending it to the ui. Feels kinda hacky to have to use a query component and return and empty div. I am probably missing something but there it is. We are discussing it some in the reason-apollo repo here. The other question I seem to keep asking myself is, how do I schema stitch in ReasonML. What I want to run two queries against different endpoints? Do I have to set up two different clients? Just some peanut gallery talk. Happy coding to you, ching-gu! |
1. About ReasonQLAfter failing to create 2 GraphQL interop libraries(Reason-Relay and Apollo-ReasonML), they made me think these clients try to do too many thing. And it makes them do poor jobs. So, I've explored a lot of other libraries and felt that cache structure shouldn't be decided by the library. Because of that, I'm trying to make a GraphQL library that do only 2 things:
And as for other commonly used features like cache, fetch more, reload, auth, etc., they should be provided as an example, library users can always copy without any acknowledgement. 2. Fetching data without components.Because of this policy, you don't need All you need are below: module Request = ReasonQL.MakeRequest(AppQuery, {
let url = "http://localhost:4000";
});
Request.send(Js.Dict.empty())
->Request.finished(data => {
self.send(Fetched(data));
}) Note:
3. Schema Stitch.Maybe the post below will solve your problem. https://medium.com/open-graphql/apollo-multiple-clients-with-react-b34b571210a5 But with ReasonQL, it's a piece of cake. All you need to do is create a new Request module with new url. Then, it will work like magic. |
Thats a big post, man. Wow. Thanks. I've considered the hacky solution of importing two different clients to for example, use yours or formidablelabs/reason-urql for querying only and keep using reason-apollo for ui queries. Don't see why that shouldnt work even if it a uninformed work around. This is a great answer, brother. Thanks for taking the time. I already have it bookmarked. |
Hey! How are you? The first version of ReasonQL is released! |
I downloaded it. I will check it out post haste, brother. Thanks for the
heads up!
…On Mon, Apr 1, 2019 at 4:22 AM sainthkh ***@***.***> wrote:
Hey! How are you? The first version of ReasonQL is released!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACQrVz5R9GITm_ybSJOFRoYPLJyLXEwFks5vcW10gaJpZM4bq0vv>
.
--
Alain
|
Hi @sainthkh. Thanks for sharing this. Learning from reading your code. Do you minde sharing the server you ran this project against?
Thank you, sir. Peace to you.
The text was updated successfully, but these errors were encountered: