1. 31 Jul, 2018 2 commits
  2. 30 Jul, 2018 2 commits
  3. 27 Jul, 2018 4 commits
  4. 26 Jul, 2018 2 commits
  5. 25 Jul, 2018 3 commits
  6. 24 Jul, 2018 3 commits
  7. 23 Jul, 2018 1 commit
  8. 22 Jul, 2018 1 commit
  9. 21 Jul, 2018 4 commits
  10. 19 Jul, 2018 2 commits
    • Brian Kim's avatar
      improve custom-server-fastify example (#4805) · 0298c722
      Brian Kim authored
      I’ve been experimenting with Next.js and Fastify and I made the following changes to the Fastify example based on what I found:
      
      ### Use Fastify’s plugin API
      IMO putting Fastify’s listen call in a promise callback is an anti-pattern, b/c the Fastify plugin API is meant to solve the problem of async server bootstrapping.
      
      [From Fastify’s Getting Started docs](https://www.fastify.io/docs/latest/Getting-Started/):
      > Fastify provides a foundation that assists with the asynchronous bootstrapping of your application.
      
      ### Set reply.sent in handlers which return promises
      
      [From Fastify’s Routes docs](https://www.fastify.io/docs/latest/Routes/#promise-resolution):
      > If your handler is an `async` function or returns a promise, you should be aware of a special behaviour which is necessary to support the callback and promise control-flow. If the handler's promise is resolved with `undefined`, it will be ignored causing the request to hang and an *error* log to be emitted.
      >
      > 1. If you want to use `async/await` or promises but respond a value with `reply.send`:
      >     - **Don't** `return` any value.
      >     - **Don't** forget to call `reply.send`.
      > 2. If you want to use `async/await` or promises:
      >     - **Don't** use `reply.send`.
      >     - **Don't** return `undefined`.
      
      `app.render` returns a promise which contains undefined, so returning it in a Fastify handler will log an error. However, returning anything besides undefined will cause Fastify to try to write to the response which Next.js has already ended. The solution is to manually set the `reply.sent` flag to true when any Next.js rendering promise is fulfilled as an alternative to calling `reply.send`.
      
      ### Make Next.js handle 404 errors
      This allows any route to throw a NotFound error and let Next.js handle the rendering of the 404 page.
      
      ### Make Next.js handle any route which starts with `_next` in dev
      This prevents dev routes from being caught by user-defined routes.
      0298c722
    • Tim Neutkens's avatar
      6.1.1-canary.2 · d83207cd
      Tim Neutkens authored
      d83207cd
  11. 18 Jul, 2018 2 commits
  12. 17 Jul, 2018 1 commit
  13. 15 Jul, 2018 1 commit
  14. 13 Jul, 2018 3 commits
  15. 12 Jul, 2018 1 commit
    • Kenneth Luján Rosas's avatar
      [with-apollo] simplify apolloState prop (#4755) · dca2ca6f
      Kenneth Luján Rosas authored
      As seen on `with-apollo-auth` there are some things that need to be addressed here too.
      
      * #4554 remove useless `apolloState` from App props on `getDataFromTree`
      * #4563 simplify `apolloState` prop
      
      Let me know if further changes/fixes are needed. 
      Thank you 🎉 
      dca2ca6f
  16. 11 Jul, 2018 4 commits
  17. 10 Jul, 2018 1 commit
  18. 09 Jul, 2018 1 commit
  19. 06 Jul, 2018 2 commits