How to clear GraphQL cache on a local DDEV Craft CMS

Oscar de la Hera Gomez
Three flowers that represent GraphQL, CraftCMS & DDEV side by side, with the text "Clear GraphQL Cache" beneath them.

To clear the GraphQL cache run the following two commands: ddev craft clear-caches/all & ddev craft cache/flush-schema.

A screenshot of a GraphQL error that could occur if the GraphQL cache has not been flushed.

The error that you encountered could look similar to the one above.

In order to clear the GraphQL cache a Craft CMS hosted locally using DDEV, you must run the following two commands in Terminal, with the current directory set to that where your Craft CMS DDEV instance is found. Incase you are looking to fix this on a hosted instance, please consult the tutorial linked below.

Step One: Clear all caches

A screenshot of Terminal showing the clear Craft CMS cache command on DDEV.

In Terminal, with the current directory set to the DDEV Craft CMS, run the following line:

ddev craft clear-caches/all

Step Two: Flush Schema

A screenshot of Terminal showing the Craft CMS Flush Schema command on DDEV.

In Terminal, with the current directory set to the DDEV Craft CMS, run the following line:

ddev craft cache/flush-schema

Any Questions ?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.

delasign logo

Book a Free Consultation.

An icon of an email.

Click here to email us.

Fill in the details below to book a free consultation or to let us know about something else. Whatever it is, we are here to help.

How can we help you ?

Contact Details