-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Support tracking SQL functions as mutations. Closes #1514 #6160
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
Conversation
|
Deploy preview for hasura-docs ready! Built with commit 7e9a2eb |
abooij
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Brandon, this is a really nice PR, and I hope you manage to merge this soon. I have lefta few notes for you to use as you wish - from my point of view they're not blockers.
Are you sure you want to tell kodiak to "merge" this PR, rather than "squash" it (which is the default if you only apply the auto-update-auto-merge label)?
docs/graphql/core/api-reference/schema-metadata-api/custom-functions.rst
Show resolved
Hide resolved
|
This PR currently has a merge conflict. Please resolve this and then re-add the |
This also supports tracking VOLATILE functions as queries. Review and discussion of the initial version of this work can be found in this closed PR: hasura#5858
...after we needed to re-use some Query.hs code in Mutate.hs No implementation changes. With the state of documentation of this part of the code it's hard to say whether this is moving towards a better module structure or is just an arbitrary change.
7078b3a to
8c09e42
Compare
yep |
|
Thanks for your contribution! Your changes have been merged successfully. |
* Support tracking SQL functions as mutations. Closes #1514 Co-authored-by: Brandon Simmons <brandon.m.simmons@gmail.com> Co-authored-by: Brandon Simmons <brandon@hasura.io> GITHUB_PR_NUMBER: 6160 GITHUB_PR_URL: #6160 * Update docs/graphql/core/api-reference/schema-metadata-api/custom-functions.rst Co-authored-by: Marion Schleifer <marion@hasura.io> * Update docs/graphql/core/schema/custom-functions.rst Co-authored-by: Marion Schleifer <marion@hasura.io> * Update docs/graphql/core/schema/custom-functions.rst Co-authored-by: Marion Schleifer <marion@hasura.io> * Update docs/graphql/core/schema/custom-functions.rst Co-authored-by: Brandon Simmons <brandon@hasura.io> Co-authored-by: Brandon Simmons <brandon.m.simmons@gmail.com> Co-authored-by: Marion Schleifer <marion@hasura.io> GitOrigin-RevId: 8fd3925
Description
Support tracking functions as mutations (top-level fields under
mutationroot field). Support is added to the v2 API while remaining backwards compatible. See comments for API design decisions.This is the second version of this feature implemented. The first is at: #5858
as_mutation):expose_as: queryorexpose_as: mutationwe'll raise a warning in some way whenever the volatility andUPDATE: I punted on thisexpose_asare "mismatched"expose_asfrom the volatility (VOLATILEimplies mutation, otherwise query)Changelog
CHANGELOG.mdis updated with user-facing content relevant to this PR. If no changelog is required, then add theno-changelog-requiredlabel.Affected components
Related Issues
#1514
Solution and Design
I re-used the machinery from support for tracking functions as queries and tried to do as little as possible.
Steps to test and verify
The tests written here represent the extent that I've tested/tried this out, so you can run those.
Limitations, known bugs & workarounds
The tests aren't particularly thorough; since so much of the queries code is re-used this seems all right to me.
Aggregations on the result set isn't implemented; it might be as simple as uncommenting the relevant line (I just noticed this as an unresolved question).
Server checklist
Catalog upgrade
Does this PR change Hasura Catalog version?
Metadata
Does this PR add a new Metadata feature?
run_sqlauto manages the new metadata through schema diffing?run_sqlauto manages the definitions of metadata on renaming?export_metadata/replace_metadatasupports the new metadata added?GraphQL
Breaking changes
No Breaking changes
There are breaking changes:
Metadata API
Existing
querytypes:argspayload which is not backward compatibleJSONschemaGraphQL API
Schema Generation:
NamedTypeSchema Resolve:-
nullvalue for any input fieldsLogging
JSONschema has changedtypenames have changed