drupal-graphql / graphql

GraphQL integration for Drupal 9/10
286 stars 202 forks source link

How to disable caching during development. #1318

Open bgronek opened 1 year ago

bgronek commented 1 year ago

I thought I'd drop this as it took a bit of work to piece it together. I needed to disable all caching in order to make the development / debugging workflow more efficient. Here's how.

  1. Create and enable a local development settings php file and accompanying development .yml file as described in sites/example.settings.local.php.
  2. Add the following entries to your development yml file. This will disable all caches related to graphql processing. services: cache.graphql.ast: class: Drupal\Core\Cache\NullBackend arguments: [ graphql_ast ] cache.graphql.definitions: class: Drupal\Core\Cache\NullBackend arguments: [ graphql_definitions ] cache.graphql.results: class: Drupal\Core\Cache\NullBackend arguments: [ graphql_results ]