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
Support mutations by global ID #126
Comments
Yep, this is definitely something that will be in PostGraphQL 2 😊. Also being able to insert/update/delete by any unique constraint as well similar to how you can select by any unique constraint. The one difficulty around this is how do we support procedures? For mutations I’m fine with an create function do_stuff(person person, i integer) returns person … What would our GraphQL mutations look like? type Mutation {
doStuff(personId: ID, i: Int): DoStuffPayload
doStuffByRowId(personRowId: ID, i: Int): DoStuffPayload
doStuffByEmail(personEmail: Email, i: Int): DoStuffPayload
} …or do we only have a mutation using the global id? |
I also want to say thanks, keep opening issues questioning assumptions made in PostGraphQL 1. We’ve learned a lot and while I don’t want to make too many breaking changes in 2, I think it gives us a great chance to question our assumptions and make a better API 👍 I’ll be opening an issue soon with some of the breaking changes I want to make and we can discuss them individually. There won’t be many and there will be backwards compatibility options for most of them 👍 |
I think mutations should be only by global The only update mutation would be:
I am not sure I understand your concern with the procedures? |
I’m going to close this as its in the PostGraphQL 2.0 beta 🎉 Start playing with the pre-release, the final release should be out really soon. Tell me what you think! 👍
|
I think postgrahql should support the global
id
in mutations, since in Relay this is the primary source of identifying an object and hererowId
is only provided as a convenience.The text was updated successfully, but these errors were encountered: