Skip to content
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

Feature/update by pk #169

Merged
merged 4 commits into from
Apr 16, 2024
Merged

Conversation

franzwilhelm
Copy link
Contributor

Today the data provider is using the update many query in hasura to update single entries. This led to a critical bug in production for one of the companies I'm developing for, where all records were updated. This is because update many actually runs without the id column in the where clause being present!

With update_resource_by_pk hasura actually requires the pk_columns to be set, and this behaviour is no longer possible.

Also update by pk is more db-efficient and should lead to easier graphql debugging for anyone experiencing issues.

NOTE: this should be considered a minor version, as it has the potential to break existing implementations that are extending the package with custom buildVariables for the UPDATE queries

hasura/graphql-engine:v2.15.1.cli-migrations-v3 is no longer present in dockerhub
Was required in order to link the local ra-data-hasura without runtime issues
@franzwilhelm
Copy link
Contributor Author

@praveenweb or @arjunyel could you have a look at this?

@franzwilhelm
Copy link
Contributor Author

@praveenweb @arjunyel ??

@praveenweb praveenweb merged commit 446461d into hasura:master Apr 16, 2024
@franzwilhelm franzwilhelm deleted the feature/update_by_pk branch April 17, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants