Hasura | Graphql | Run metadata reload on running server #8999
-
Currently I have no way of reloading the metadata without restarting the server by pushing a new version. I want to reload the metadata and my application is on aws server which cant be accessed directly due to api gateway. Hence, I don't have access of Hasura cli on the aws server. ---docker file COPY metadata ./hasura-metadata |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The hasura cli's You will however need access to hasura and the admin secret. There's not really a way to avoid this. For example, if you want to reload metadata whenever a record is added to a specific table, you could add an event trigger that calls the reload metadata api. Whether this is the correct path forward depends on your application logic. |
Beta Was this translation helpful? Give feedback.
The hasura cli's
hasura metadata reload
relies on thereload metadata
api internally. You could use this to trigger a reload without restarting the server.You will however need access to hasura and the admin secret. There's not really a way to avoid this.
However, you could fully automate this in such a way that hasura reloads itself whenever the conditions for reloading are met.
For example, if you want to reload metadata whenever a record is added to a specific table, you could add an event trigger that calls the reload metadata api. Whether this is the correct path forward depends on your application logic.