-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
add computed fields support on console #3522
Conversation
Deploy preview for hasura-docs ready! Built with commit 1f544d9 |
Review app for commit 8cc5387 deployed to Heroku: https://hge-ci-pull-3522.herokuapp.com |
Review app for commit f7a39af deployed to Heroku: https://hge-ci-pull-3522.herokuapp.com |
Review app for commit abdd967 deployed to Heroku: https://hge-ci-pull-3522.herokuapp.com |
Review app for commit 574248f deployed to Heroku: https://hge-ci-pull-3522.herokuapp.com |
Review app for commit 713126b deployed to Heroku: https://hge-ci-pull-3522.herokuapp.com |
Review app for commit edd4bbc deployed to Heroku: https://hge-ci-pull-3522.herokuapp.com |
@rikinsk Hey nice job with this PR, I was wondering if this affected the computed field and roles. Should I create a new Issue?. |
Hey, this is really awesome and would fix one of my main gripes at the moment, which is creating views on my tables so I can add a computed field. My use case is signing URLs for S3 access, eg profile photo etc. In the design, I think it would be clearer if the "function definition" area didn't show up until a matching function was found. I tried to start typing there, and took a sec to realize I needed to type in the exact name of the function. What about a dropdown of existing functions? Anyway, looking forward to using this! |
Interesting issue—we basically need an “empty” migration, just to get the metadata migrations to fire. That shouldn’t be difficult to do, and in fact it’s probably simplest to genuinely just create an empty SQL file for the migration, which I think should work? I’ll figure it out and push a change to this branch. |
Review app for commit a0f7237 deployed to Heroku: https://hge-ci-pull-3522.herokuapp.com |
Just tested the last deploy: https://hge-ci-pull-3522.herokuapp.com/ |
Also, if there are two columns; Edit:
And it works. |
Review app for commit b7e6c86 deployed to Heroku: https://hge-ci-pull-3522.herokuapp.com |
Review app for commit f1ab375 deployed to Heroku: https://hge-ci-pull-3522.herokuapp.com |
Review app for commit 0028190 deployed to Heroku: https://hge-ci-pull-3522.herokuapp.com |
This PR is finally feature complete and ready for merge @marionschleifer @wawhal @lexi-lambda Please add your reviews . @lexi-lambda The empty server migration file is now replaced by one added in another PR. |
Review app https://hge-ci-pull-3522.herokuapp.com is deleted |
Review app for commit 1f544d9 deployed to Heroku: https://hge-ci-pull-3522.herokuapp.com |
Description
Add support for adding computed fields via the console
TODO
Affected components
Related Issues
#3203 #3565
Solution and Design
Steps to test and verify
Limitations, known bugs & workarounds
Server checklist
Catalog upgrade
Does this PR change Hasura Catalog version?
Metadata
Does this PR add a new Metadata feature?
run_sql
auto manages the new metadata through schema diffing?run_sql
auto manages the definitions of metadata on renaming?export_metadata
/replace_metadata
supports the new metadata added?GraphQL
Breaking changes
No Breaking changes
There are breaking changes:
Metadata API
Existing
query
types:args
payload which is not backward compatibleJSON
schemaGraphQL API
Schema Generation:
NamedType
Schema Resolve:-
null
value for any input fieldsLogging
JSON
schema has changedtype
names have changed