Conversation
Sepehr-Sobhani
left a comment
There was a problem hiding this comment.
Beautiful 🤩 !! Just a few comments on how to make things better, but don't worry about fixing them.
| - command used: `npx postgraphile -c postgresql://awilliam@localhost:5432/todo --schema todo_app --watch` | ||
| 3. Open the Graphiql (a graphical UI for GraphQL queries) instance that should be live at `/graphiql` on localhost once Postgraphile is running. | ||
| 4. Confirm that GraphQL is introspecting your Postgres schema by querying the todos you inserted in the previous step. | ||
| - query used in /graphiql: | ||
| ``` | ||
| { | ||
| query { | ||
| allTodos { | ||
| edges { | ||
| node { | ||
| id | ||
| task | ||
| completed | ||
| dateCreated | ||
| dateUpdated | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` |
There was a problem hiding this comment.
Thanks for updating This 🤩 Since we don't merge onboarding PRs, maybe you want to make a separate PR for this.
| "**/node_modules/**", | ||
| "**/__mocks__/**", | ||
| "**/__generated__/**" | ||
| ] |
There was a problem hiding this comment.
You can make sure all your relay compiled queries end up in the same folder by adding this:
module.exports = {
...
artifactDirectory: "./__generated__",
...
}
| variables, | ||
| }), | ||
| }); | ||
|
|
There was a problem hiding this comment.
We could use an error handler here if json has errors.
There was a problem hiding this comment.
the team uses lowercase SQL as a coding standard. we also use the snake case naming convention for SQL files.
| INSERT INTO todo_app.todos (task, completed, date_updated) | ||
| VALUES ('Part 1', True, null); | ||
| INSERT INTO todo_app.todos (task, completed, date_updated) | ||
| VALUES ('Part 2', False, null); | ||
| INSERT INTO todo_app.todos (task, completed, date_updated) | ||
| VALUES ('Part 3', False, null); | ||
| INSERT INTO todo_app.todos (task, completed, date_updated) | ||
| VALUES ('Part 4', False, null); | ||
| INSERT INTO todo_app.todos (task, completed, date_updated) | ||
| VALUES ('Part 5', False, null); | ||
| INSERT INTO todo_app.todos (task, completed, date_updated) | ||
| VALUES ('Part 6', False, null); |
There was a problem hiding this comment.
This can be simplified to:
insert into todo_app.todos (task, completed, date_updated)
values
('Part 1', true, null),
('Part 2', false, null),
...
There was a problem hiding this comment.
This won't error if we don't have seed data; verify only fails if there's an error. We could check the count of the query is greater than 0.
There was a problem hiding this comment.
Same as the previous comment.
No description provided.