<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed><type>rich</type><version>1.0</version><provider_name>phorkie</provider_name><provider_url>https://p.cweiske.de/</provider_url><title>Drupal 8 GraphQL 3: entityRendered without cache?</title><author_name>Christian Weiske</author_name><cache_age>86400</cache_age><width>900</width><height>900</height><html>&lt;!-- embedding all files of https://p.cweiske.de/768 --&gt;
&lt;link rel="stylesheet" href="https://p.cweiske.de/css/embed.css"/&gt;
&lt;div class="phork" id="768"&gt;
    &lt;div class="phork-file"&gt;
 &lt;div class="phork-content"&gt;
  
&lt;div class="document"&gt;


&lt;p&gt;Fetching content via GraphQL  from Drupal 8 took a very long time here, especially on pages with many images (that were resized via thumbor).&lt;/p&gt;
&lt;p&gt;I wondered if GraphQL's &lt;tt class="docutils literal"&gt;entityRendered&lt;/tt&gt; property does not cache page content - especially since we're using the &amp;quot;graphql&amp;quot; drupal user, and caching in Drupal 7 was non-existent for logged-in users.&lt;/p&gt;
&lt;p&gt;It turns out that Drupal 8 has a dynamic page cache[1] which is able to do caching for logged in users.&lt;/p&gt;
&lt;p&gt;The culprit were my settings in docroot/sites/base/development.services.yml:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
parameters:
  graphql.config:
    development: true
&lt;/pre&gt;
&lt;p&gt;That disabled the cache.&lt;/p&gt;
&lt;p&gt;[1] &lt;a class="reference external" href="https://www.drupal.org/docs/8/core/modules/dynamic-page-cache/overview"&gt;https://www.drupal.org/docs/8/core/modules/dynamic-page-cache/overview&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;

 &lt;/div&gt;
 &lt;div class="phork-meta"&gt;
  &lt;a href="https://p.cweiske.de/768/rev-raw/141dc72d6a32f0cabd31e02496c9f2bf75653dfa/README.rst" style="float: right"&gt;view raw source&lt;/a&gt;
  &lt;a href="https://p.cweiske.de/768#README.rst"&gt;README.rst&lt;/a&gt;
 &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</html></oembed>
