Content Deep Dive
Using JSonnet for programmable Hasura metadata
Blog post from Hasura
Post Details
Company
Date Published
Author
Phil Freeman
Word Count
1,476
Language
English
Hacker News Points
-
Summary
The text discusses using JSonnet for programmable Hasura metadata. It explains that while exported configuration is useful for backup and restore workflow, it's not stored in a human-readable format which makes it less useful for direct or programmatic manipulation. The author then demonstrates how to refactor the exported configuration into a more readable form using the Jsonnet templating language. They also provide examples of deduplicating constants and objects, using standard library functions, and employing functions in the process. Finally, they suggest various ways in which programmable configuration files can reduce complexity and support features not directly supported by graphql-engine.