af / apollo-local-query

Simpler server rendering with apollo-client 1.x, using a local GraphQL networkInterface
MIT License
64 stars 7 forks source link

Using this results in my server-side rendering locking up #3

Closed curio77 closed 7 years ago

curio77 commented 7 years ago

I'm trying to use this in the context of react-starter-kit. After integrating apollo-client according to its docs I proceeded to incorporate this similarly straightforwardly. However, for me this causes server-side rendering to lock up (browser times out) without throwing any errors, so I'm somewhat clueless as to the cause (and how to go about debugging it). Any ideas?

af commented 7 years ago

Hi, Thanks for the report. Can you try running your app with debug output enabled (ie DEBUG=apollo-local npm start) and see if anything from this module gets logged? You could also add another debug() call before the try/catch in query() to make sure it's getting called.

curio77 commented 7 years ago

Sorry about the trouble: it turns out I was simply using the wrong import syntax instead of the require given in the docs. Things now work as expected, thanks! :-)