threepointone/glamor

Server-side rendering support promise

Closed this issue · 2 comments

When use it with Apollo, Apollo returns a promise instead of a string.

Apollo.renderToStringWithData(app).then(html => console.log(html))

you can work around this by wrapping the final string

Apollo.renderToStringWithData(app)
  .then(html => renderStatic(() => html))
  .then(({ html, css, ids }) => console.log(html, css, ids))

closing for now, lemme know if this doesn't work!