Google Core update and the very bad impact on meteor apps (FCP/LCP/CLS) - Desperate call for help

@macrozone @nschwarz

That’s as far as I could go so far with starting from the apollo skeleton and tried to build on top of it. Right now it’s not working, but it’s something :smiley:

I don’t think the link in the ssr file is good, found an alternative online on a repo but seems big, so wanted to have your opinion if that’s any good:

   const client = new ApolloClient({
     // simple local interface to query graphql directly
     link: new ApolloLink(({ query, variables, operationName }) => {
       return new Observable(obs => {
         graphql(schema, print(query), {}, {}, variables, operationName)
           .then(result => {
             obs.next(result);
             obs.complete();
           })
           .catch(obs.error.bind(obs));
       });
     }),
     cache: new InMemoryCache(),
     ssrMode: true,
   });

I know I’m also missing the last piece, the rendering part which should look like something:

 await getDataFromTree(App);

  sink.renderIntoElementById("app", html);
  sink.appendToBody(`
    <script>
      window.__APOLLO_STATE__=${JSON.stringify(client.cache.extract())};
      window.__CSS__=${JSON.stringify(ids)}
    </script>
  `);

But here as well I’m unsure where to get the html from.

Also I still would like to include react helmet and styled-components, but that’s gonna be later, first I want the original skeleton to work.