{"type":"rich","version":"1.0","provider_name":"phorkie","provider_url":"https:\/\/p.cweiske.de\/","title":"Drupal 8 GraphQL 3: entityRendered without cache?","author_name":"Christian Weiske","cache_age":86400,"width":900,"height":900,"html":"<!-- embedding all files of https:\/\/p.cweiske.de\/768 -->\n<link rel=\"stylesheet\" href=\"https:\/\/p.cweiske.de\/css\/embed.css\"\/>\n<div class=\"phork\" id=\"768\">\n    <div class=\"phork-file\">\n <div class=\"phork-content\">\n  \n<div class=\"document\">\n\n\n<p>Fetching content via GraphQL  from Drupal 8 took a very long time here, especially on pages with many images (that were resized via thumbor).<\/p>\n<p>I wondered if GraphQL's <tt class=\"docutils literal\">entityRendered<\/tt> property does not cache page content - especially since we're using the &quot;graphql&quot; drupal user, and caching in Drupal 7 was non-existent for logged-in users.<\/p>\n<p>It turns out that Drupal 8 has a dynamic page cache[1] which is able to do caching for logged in users.<\/p>\n<p>The culprit were my settings in docroot\/sites\/base\/development.services.yml:<\/p>\n<pre class=\"literal-block\">\nparameters:\n  graphql.config:\n    development: true\n<\/pre>\n<p>That disabled the cache.<\/p>\n<p>[1] <a class=\"reference external\" href=\"https:\/\/www.drupal.org\/docs\/8\/core\/modules\/dynamic-page-cache\/overview\">https:\/\/www.drupal.org\/docs\/8\/core\/modules\/dynamic-page-cache\/overview<\/a><\/p>\n<\/div>\n\n <\/div>\n <div class=\"phork-meta\">\n  <a href=\"https:\/\/p.cweiske.de\/768\/rev-raw\/141dc72d6a32f0cabd31e02496c9f2bf75653dfa\/README.rst\" style=\"float: right\">view raw source<\/a>\n  <a href=\"https:\/\/p.cweiske.de\/768#README.rst\">README.rst<\/a>\n <\/div>\n<\/div>\n<\/div>\n"}
