This is a solution by https://github.com/coco98 and https://github.com/tirumaraiselvan from the Hasura team. I put it here because it was too long to copy paste it onto Discord :/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @satisfies {import('json-schema-to-ts').JSONSchema} */ | |
const schema2 = { | |
type: 'object', | |
additionalProperties: false, | |
properties: { | |
input: { | |
type: 'object', | |
additionalProperties: false, | |
properties: { | |
x: { type: 'number' }, |
This is how we do metadata in Hasura instead of going through the migrations mechanism in v1. It's interesting that the Hasura team is following a similar approach https://youtu.be/ik3vd0Ju9sw?t=1636 with the next iteration of the metadata!
This process really helps us model our data and the relations way faster. In particular when it comes down to renaming things or removing many permissions at once.
I should've totally shared this earlier :/.
What we do is that we write our metadata in YAML files inside a metadata
folder and split them by types.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CHANGES=`git log origin/production..origin/master`; | |
if [ -z "$CHANGES" ]; then | |
echo "✅ Production is already in sync with master"; | |
exit; | |
fi; | |
echo "" | |
echo "" | |
echo "📝 This is what's on master that's could be released to production:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unset GREP_OPTIONS | |
# find content in javascript files inside a folder | |
# eg: findjs color src | |
function findjs { | |
find "${2:-.}" -name '*.js' -not -path '*node_modules*' -not -path '*dist*' -exec grep "$1" --color=auto {} \; -print | |
} | |
# find content in javascript files inside a folder and replace it with something else | |
# eg: findjsr red blue src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let glob = require('fast-glob'); | |
let fs = require('fs').promises; | |
let path = require('path'); | |
let RELATIVE_IMPORT_ABOVE_FILE = /^import .+? '((\.\.\/)+)/; | |
let isRelativeImportAboveFile = line => RELATIVE_IMPORT_ABOVE_FILE.test(line); | |
let asAbsoluteImport = line => | |
line.replace(line.match(RELATIVE_IMPORT_ABOVE_FILE)[1], ''); | |
async function run() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJhcHAiOiJUZXN0MSIsIm9yZyI6InRlc3QuY29tIiwiaXNzIjoidWxzdGVyLnVzZWluZmluaXRlLmlvIiwidG9rZW5fdHlwZSI6IkFDQ0VTU19UT0tFTiIsImNsaWVudF9pZCI6IjdlMTU0Y2VjLTJkOTMtNDMyZi1iMWFiLTRhZWQwNjg5NTg1NyIsIm1heF9hZ2UiOjg2NDAwLCJhdWQiOiI3ZTE1NGNlYy0yZDkzLTQzMmYtYjFhYi00YWVkMDY4OTU4NTciLCJ1c2VyX2lkIjoiMDAxNDA1NjQwMDcyQHRlc3QuY29tIiwiZ3JhbnRfaWQiOiI5YjBmNTczNi05ZjRjLTQ5YmItODI3My1lMTA1Y2I5NDk4ODEiLCJzY29wZSI6Im9wZW5pZCBhY2NvdW50cyIsImNvbnNlbnRfcmVmZXJlbmNlIjoiYTI1NjEyODgtMWNjZi00MjZmLTg0MTItNzMyMDRjYjdjY2JkIiwiaWF0IjoxNTU1MTY0NDU0LCJqdGkiOiI5OTc1ZjA4Ny1iOWQyLTQzZTUtYTYyMC01NjliZTMwZTkzMmMiLCJ0ZW5hbnQiOiJVbHN0ZXIifQ.qufBxwYounETzAUTCaoe5VftzrXVqx3QXguMKPrgVuJRBPVHwHFRfWpyI7tMtkMfCNtcRmZ7WXq8XY2P-ZjiNQcG8eyP-Ok2066lQ8EbrN7i6HTD_pmsvYBTzANgw44_TSmUpw8OCy3R0PqEylPlzUFyHHFyNIZZg4h3Zv-y_rKKoMkYi1_s0_-APjHsq44jlGwV73MfCbMEMEbA9YI3rShCNIjHzH9Qw-ySctvTbD5WEn3tJSTcxvNPhZKlGRNcxaqCUoIIcT-t_rdmI75Z-tOh90O4r5K4qOZADR9WsWz5ze_GGuTiv0KMAguoCQFKUB9OvkAzlW1Mc9Nx3O2-Zw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let fetch = require('node-fetch') | |
// let CLIENT_ID = 'tbBFGo6qj7A90zWKLDOoIpCIsLmSzdbsebMkTaIfCCI=' | |
// let CLIENT_SECRET = '0us3SYDAA9otXvRrGmEvtuqHT4StQyqmsSFFK_76YfM=' | |
let CLIENT_ID = 'SsqVtOMuDkMSMkcWhsCcl0V3mP-6UdmeF8L7Chbup5s=' | |
let CLIENT_SECRET = 'U95aq9M_iqtDOM2cZKvNWPK4s4iUs6K7TLVljB5XV1M=' | |
let REDIRECT_URI = 'https://ub-test-hackathon-2019.ulsterbank.com/redirect' | |
// customer number | |
// let TEST_USER_NAME = '1492884928|2' // '0014056040072' // '1492884928' | |
let TEST_USER_NAME ='001405640072' // '1495667979|1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Task manager | |
Progress bar | |
# can be filtered by meta tags, potentially automatically derived from notes through NLP | |
# meta tags could be grouped and saved as presets | |
# it would also display archived tasks, which by default won't be retrieved | |
Tasks filter | |
List of tasks | |
Task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App | |
# onWhen App is at Login | |
LoginOrSignup& | |
Login | |
goto Signup -> Signup | |
Container& | |
goto Review TC -> Review TC | |
Capture Email | |
Capture Password | |
submit -> F11 |
NewerOlder