-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Upsert support #190
Comments
upsert support is on the roadmap but the user facing API is still being spec'd I'm familiar with Hasura and Graphile's upsert APIs and would like to avoid directly referencing the constraint names if possible |
is there any update on this? :) |
none yet, we'll be looking at user defined functions and views first |
thanks @olirice ! do you have any educated guess on:
many thanks! |
sure
Assuming:
I'd suggest
|
thanks a lot for the update and suggestion! |
@olirice , a note if Im correct on your proposal: scenario, upsert in a single transaction
Assume:
your suggestion if Im correct (not that I have a better idea) has issues what are your thoughts? |
Any update on this? I'm currently using custom defined upsert functions and calling them via supabase.rpc, but would much prefer standardizing to use gql mutations everywhere. |
Note yet but nested inserts is the next large project we're going to tackle for GraphQL and this is pre-req for that so it should start moving soon |
any update on when supabase will have update mutations? |
+1 for upsert support, we'd start using it immediately :) |
Anything to reduce the number of required API requests for common DB operations will greatly improve the quality of the graphql platform 🙏 |
Even though Supabase supports upsert, the mutation is not available from GraphQL
Steps to reproduce the behavior:
Expected behavior
Would expect to see a Mutation.upsertInto[TableName]Collection operation that would allow a constraint name to be used, or alternatively insertInto[TableName]Collection could have onConflict support as in Hasura: https://hasura.io/docs/latest/graphql/core/databases/postgres/mutations/upsert/
Versions:
The text was updated successfully, but these errors were encountered: