2

When attempting to use GraphQL Playground, it seemed like a cached version of schema.graphql was being referenced. So, I went ahead and ran php artisan cache:clear, which resulted in an error of "Server cannot be reached" and '"error": "Response not successful: Received status code 500"'.

I tried running php artisan cache:config, but that didn't resolve the issue.

I'm expecting to be able to connect, but it doesn't seem to want to connect. Connecting wasn't an issue prior to running php artisan cache:clear, just that any attempts to write a query seemed to reference the old schema.graphql, which isn't expected.

MatthewS
  • 455
  • 2
  • 7
  • 22

1 Answers1

4

To clear lighthouse's schema cache you need to run php artisan lighthouse:clear-cache. You can check it on lighthouse documentation https://lighthouse-php.com/master/performance/schema-caching.html

For local development I prefer to disable the schema caching, setting the local environment variable LIGHTHOUSE_CACHE_ENABLE to false.

  • Thank you! I see a whole host of good artisan commands for lighthouse when running php artisan. I appreciate your help. – MatthewS Aug 18 '19 at 01:36