Comments (3)
Looks good, some small notes:
-
config.yaml
can't be inside.nhost
because Hasura needs it at the root of the project alongsidemigrations
-
I think point number 1 in
nhost dev
can and should be done onnhost init
when creatingconfig.yaml
-
The same thing for number 2, we are already creating
.env.development
because of Hasura's webhooks that are specified using ENV vars.
So basically, what we should change is adding nhost login
and then nhost init
(maybe with a --project-id flag)
from cli.
1.
Right, about the config.yaml
(hasura). We need to handle that too.
I was thinking of a config file specifically for Nhost. Maybe we can name it .nhost/nhost.yaml
. We will store the Nhost project id here so nhost dev
(and future commands) knows what project it is.
2.
The reason I wanted to place fetching project info in nhost dev
was because if a user changes some settings in Nhost that should be reflected next time the user runs nhost dev
.
Think about the following case:
-
User starts Nhost project.
-
User run
nhost init
. -
User run
nhost dev
. (then terminate this command) -
User make a change in the Nhost console. Ex upgrade the Hasura version.
-
Next time the user runs
nhost dev
that new hasura version should be used.
However this introduce another issue. Let's say a user is on Hasura v1.2.0
in production and want to upgrade to v1.3.0
. The user wants to ofc upgrade the local Hasura version to v1.3.0
first to make sure everything is working. Once everything is working, the user wants to upgrade the Hasura version to v1.3.0
in production. How should this be handled?
One solution would be to introduce some special flag to nhost dev
or additional command to handle this. Like nhost pull
to pull down all version/settings from Nhost (prod). All settings gets saved in a config file.
Before a user issue nhost dev
the user can manually change some configurations in the config file. Ex upgrade Hasura version.
3.
Ah right about the env vars. The issue is that Hasura wont start if not all environment variables are available on startup. This is a bit related to the first (1.) point too.
from cli.
-
Do you see a reason for not using the same
config.yaml
file? -
Exactly because of the issue you mention (wanting to test different versions locally), I would not always request, with every
nhost dev
, for the production version being used. I would do that only once, onnhost init
. I think we should always encourage local changes first, production next. Also, I could see this being automated (p.e. update hasura version in production) through the CLI.
from cli.
Related Issues (20)
- graphql-engine server failed x509: certificate has expired or is not yet valid HOT 1
- [Proposal] Change the usage of `HASURA_GRAPHQL_JWT_SECRET` to allow for JWT configuration beyond just the JWT key HOT 2
- WSL2 postgres is unhealthy HOT 1
- allow multiline secrets in .secrets HOT 5
- project name with uppercase looks like issues with traefik HOT 1
- nhost config pull could use a "force" mode HOT 1
- claims_map should support arrays too HOT 3
- apply-seeds in order HOT 1
- Share data between branches HOT 1
- WSL2 Windows build HOT 1
- implement nhost run cli
- nhost sw version shows complete changelog HOT 1
- local environment starting, but is not accessible via local URLs HOT 2
- Link a self hosted remote HOT 1
- Do not run "config pull" unless project initialized
- run: add mechanism to simplify running dev instances of software
- Presigned URLs are incorrect when using a custom port for storage with nhost up
- install old version of cli HOT 1
- nhost sw version still shows complete changelog HOT 1
- local settings broken when using custom ports HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.