-
Notifications
You must be signed in to change notification settings - Fork 2.8k
add default browser option to cli (close #3333) #3406
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
Conversation
|
Beep boop! 🤖 Hey @tibotiber, thanks for your PR! One of my human friends will review this PR and get back to you as soon as possible. Stay awesome! 😎 |
|
Deploy preview for hasura-docs ready! Built with commit fdaf5e9 |
|
Review app for commit fdaf5e9 deployed to Heroku: https://hge-ci-pull-3406.herokuapp.com |
shahidhk
left a comment
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 the PR @tibotiber and extremely sorry about the delay in reviewing this PR.
On giving a second thought at this, I think this configuration should just be a flag for the console command rather than an environment variable since it is only used on this command
Something like:
hasura console --browser chrome
Let me know what you think. 😄
|
Hi @shahidhk, a CLI flag sounds appropriate to me as well. I checked the source quickly and it seems easier to find examples than for environment variables. I'll try to have a go at it, probably after the new year. Have a great time if you celebrate and speak soon. |
|
Hi, I was gonna start reworking this but it seems @ashishra0 has already done this in #3601. Kindly update if his PR is good to go, then we can just close this and the related issue. I don't mind reworking this if it's still needed. |
|
@tibotiber You can close this PR. If you could test out @ashishra0's PR and see if it works out for your use-cases, that would be great. I'll credit you both in the merge commit. |
|
@shahidhk I've test and looks good to me. Posted the same on the PR. Closing here. :) |
|
Review app https://hge-ci-pull-3406.herokuapp.com is deleted |
|
Beep boop! 🤖 Hey @tibotiber! Sorry that your PR wasn’t merged. Do take a look at any of the other open issues to see if you’d like to take something up! We’re around on Discord if you have any questions 😄 |
|
Review app https://hge-ci-pull-3406.herokuapp.com is deleted |
|
@tibotiber Need your email address to add to the commit message. |
|
Sent to your twitter DM. |
Description
Hi!
This is the PR discussed in #3333 with @shahidhk. It adds the possibility to add
HASURA_GRAPHQL_CLI_DEFAULT_BROWSERin your environment variables, which is picked up and used when runninghasura console. If no value is provided, the default browser is used (doesn't change behaviour).I have replaced
Spinby normal logs as we may prefer to always see the browser being used.Also I would have liked to add a note to the docs but it seems the CLI docs are auto generated by cobra so I'm not sure if I should touch these files.
Note that I am new to go so you might need to guide me a bit.
Affected components
Related Issues
#3333
Solution and Design
Server checklist
Catalog upgrade
Does this PR change Hasura Catalog version?
Metadata
Does this PR add a new Metadata feature?
run_sqlauto manages the new metadata through schema diffing?run_sqlauto manages the definitions of metadata on renaming?export_metadata/replace_metadatasupports the new metadata added?GraphQL
Breaking changes
No Breaking changes
There are breaking changes:
Metadata API
Existing
querytypes:argspayload which is not backward compatibleJSONschemaGraphQL API
Schema Generation:
NamedTypeSchema Resolve:-
nullvalue for any input fieldsLogging
JSONschema has changedtypenames have changedSteps to test and verify
To try it run
HASURA_GRAPHQL_CLI_DEFAULT_BROWSER='Firefox Developer Edition' hasura console. Change to your browser of choice that is not your default browser.Limitations, known bugs & workarounds