Skip to content

Commit

Permalink
Adds note about "Cannot query on type" errors in VSCode
Browse files Browse the repository at this point in the history
Closes #4827
  • Loading branch information
cannikin committed Mar 25, 2022
1 parent 6b46b9e commit e668980
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/docs/tutorial/chapter2/getting-dynamic.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ Okay but what if we click "Delete"?

So, Redwood just created all the pages, components and services necessary to perform all CRUD actions on our posts table. No need to even open Prisma Studio or login through a terminal window and write SQL from scratch. Redwood calls these _scaffolds_.

> If you head back to VSCode at some point and get a notice in one of the generated Post cells about `Cannot query "posts" on type "Query"` don't worry: we've seen this from time to time on some systems. There are two easy fixes:
>
> 1. Run `yarn rw g types` in a terminal
> 2. Reload the GraphQL engine in VSCode: open the Command Palette (Cmd+Shift+P for Mac, Ctrl+Shift+P for Windows) and find "VSCode GraphQL: Manual Restart"
Here's what happened when we ran that `yarn rw g scaffold post` command:

- Created several _pages_ in `web/src/pages/Post`:
Expand Down

0 comments on commit e668980

Please sign in to comment.