-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Part 3 #17
base: main
Are you sure you want to change the base?
Part 3 #17
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use an error handler here if json
has errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as the previous comment.
No description provided.