-
Notifications
You must be signed in to change notification settings - Fork 365
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
feat: add graph:init command #4711
Conversation
📊 Benchmark resultsComparing with d10b135 Package size: 226 MB⬇️ 0.00% decrease vs. d10b135
Legend
|
error(`Unable to create Netlify Graph persist query token: ${JSON.stringify(result.errors, null, 2)}`) | ||
} | ||
|
||
if (envChanged) { |
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 seems to always be true.
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.
Sorry it took so long to get around to looking at this from a docs/copy standpoint. I have some questions and suggestions - mostly around error logs.
src/commands/graph/graph-init.js
Outdated
if (!siteId) { | ||
error( | ||
`No siteId defined, unable to start Netlify Graph. To enable, run ${chalk.yellow( | ||
'netlify init', | ||
)} or ${chalk.yellow('netlify link')}`, | ||
) | ||
} |
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.
[sand] It looks like we're using a slightly different error log with graph-edit
. In the interest of consistency, we should probably make them the same.
Looks like we're not importing NETLIFYDEVERR
from utils
in graph-init
. Would need that to make the two error logs more consistent.
envChanged = true | ||
newEnv.NETLIFY_GRAPH_PERSIST_QUERY_TOKEN = token | ||
} else { | ||
error(`Unable to create Netlify Graph persist query token: ${JSON.stringify(result.errors, null, 2)}`) |
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.
[pebble] This error message explains the "what", but not the "why" or "what now". With error messages, we try to describe what happened, why it happened, and, if at all possible, what the user can do about it.
The error message for no side id above is a good example. Is there any way we can can explain why the error happened and, perhaps, guide users in what they can do here?
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 errors we're printing should give us more information about what happened.
📊 Benchmark resultsComparing with 7203fe5 Package size: 230 MB(no change)
Legend
|
Co-authored-by: Kyle Rollins <kyleblankrollins@gmail.com>
Summary
Adds
graph:init
to bootstrap all of the resources for a Netlify site to work with Netlify GraphFor us to review and ship your PR efficiently, please perform the following steps: