-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apollo2 merge devel #2168
Apollo2 merge devel #2168
Conversation
meteor/apollo Atmosphere version does not seem up to date with the Github repo
[WIP] Apollo 2: apollo-state-link and RR4
It seems to fix the undefined results issue in the `graphql` HOC It also enables Apollo chrome development tool, which is necessary to debug local cache
Apollo2 withMessages
Concerning
|
Weird, I'm not sure what's going on but I ended up pushing to this branch: https://github.com/VulcanJS/Vulcan/tree/lbke-apollo2-merge-devel which doesn't appear in this PR. |
Does http://localhost:3000/graphiql not work anymore? Also, although SSR works I'm running into an issue where every request to http://localhost:3000/graphql times out. Weird. |
I don't know about the git branch thing sorry, I am not very experienced on this. GraphiQL should be replaced by Playground indeed, on the The timeout thing sounds weird indeed, do you have more info on how to reproduce? It's just failing in your app? I'll try it again on Awesome-Vulcan tomorrow. |
I think it's probably clearer/safer to keep the playground and/or graphiql on separate URLs than the endpoint? And yeah I think keeping GraphiQL for now would be best, so we don't change everything at once? For the timeout no, all I can say is that |
Ok I'll try that. The And yes GraphQL errors should appear on the server logs, though I did not investigate error handling yet. |
This is awesome! |
So the Mongo-redux thing is the only thing that still provoke issue. I think the best would be to simply deprecate it and change the Starter package that relies on it (example-forms). I am opening a new issue to document things that can be improved later/need 3rd party fix. |
There is also those issues left:
|
What is the alternative to before:
|
The client is created here: https://github.com/VulcanJS/Vulcan/blob/c81f58a91c63d39d7802359d7b2439a4907784d4/packages/vulcan-lib/lib/server/apollo-ssr/apolloClient.js It takes a It is used here:
However with this implementation it's not easy to retrieve the client if you have another use case, so maybe we could write a small helper that gives you the client. |
…ields; add version number to apollo package
This issue appears when running tests or the Vulcan app directly: apollographql/apollo-server#1935. It is triggered when the Apollo server is created. Not yet investigated. |
c81f58a
to
34596a9
Compare
Gave this a try. Ran into issues, worked through some of them (issues and solutions below), still have some more to work through. Note that this is on LessWrong's fork of Vulcan, which is pretty significantly modified, which may have created some of our own issues. First issue:
This went away after I went through my project's apollo-engine: ^0.5.4 => ^1.1.2 I didn't take the time to isolate which of these was the fix, or to check whether that GraphQL 14-major-version upgrade broke other things. Second issue: some failing imports due to missing dependencies. Resolved with Next I ran into some issues with The Next up,
I took out the At this point I can get a basic render of the front page, albeit without any Apollo-using components populated. The SSR rendering is missing its material-UI stylesheet (though it gets successfully filled in later). There are two reasons for this. The first is because the After page load the client makes GraphQL queries to the server, which appear to be correct. However, the queries hang until they time out (as do test queries made with curl). Also, less importantly, each query is sent as a separate request, rather than grouped together into one request, as they were before. |
@jimrandomh thanks for the notes! See also this thread which has few pointers: #2171 (comment) |
Hi @jimrandomh , thanks for taking time to give this feedback. Concerning React Router, those are normal issues related to RR4 breaking API compared to RR3, there are indeed a few things that changes. Basically all stuff specifically related to web are provided by Concerning material ui, I've pushed a PR on Please try the Btw I'll close this PR to avoid confusion, we can discuss this further on Slack or on #2171 |
Almost there!
I've updated the branch to match
devel
.What blocks final merge:
apollo-server.js
fixes improvements/fixes will be lost (they are present but commented out). For example Allow user to customize apollo json parser options #2147. Basically we need to be able to pass options to the Apollo Server.example-forums
failsWhen updating an app the biggest source of breaking change is direct use of RR4, but we can nothing about it so that's okay, it's quite easy and even documented. Also redux related functions must be imported from
vulcan:redux
now. A fewrouter.XX
callbacks are deprecated.I've updated my comment in #2081 accordingly.
And that should be all 🎉 Most example of the Starter are working as expected. It may need an alpha release to spot other bugs, I may also try to update Awesome Vulcan to check if there are issues I have missed.