You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apologies if I missed it, but there doesn't seem to be a way to use a ResultReference to do a /set completely server-side. I think there are a number of good use-cases for being able to do this efficiently (mostly around updating based on a query), and I think it could be done with fairly minimal modifications to the spec. I'm imagining the ResultReference type gaining a new (optional) property -- call it properties or setProps or something -- that would cause the reference to resolve to a JSON object with the keys being taken from the pointer resolution, and values being whatever you pass. For example:
What do you think? Does this sound like something worth considering? My hunch is that it will require some discussion before it's worthwhile to create a PR, but I can take a stab at it if it would be helpful.
The text was updated successfully, but these errors were encountered:
We didn't include something like this in the core spec (which is now published and final) because we were concerned about adding too much complexity. However, I think it's perfectly reasonable to have this as an extension if you would like to write it up and propose it to the JMAP working group.
The other thing I think this extension would probably want to define is some way of getting the server to omit some or all of the response (e.g. you don't need it to return you the Email/query response in your example, as it's just used for back references).
Apologies if I missed it, but there doesn't seem to be a way to use a
ResultReference
to do a/set
completely server-side. I think there are a number of good use-cases for being able to do this efficiently (mostly around updating based on a query), and I think it could be done with fairly minimal modifications to the spec. I'm imagining theResultReference
type gaining a new (optional) property -- call itproperties
orsetProps
or something -- that would cause the reference to resolve to a JSON object with the keys being taken from the pointer resolution, and values being whatever you pass. For example:If the
Email/query
call returned{"ids": ["e1", "e2"]}
, theEmail/set
call would resolve to:What do you think? Does this sound like something worth considering? My hunch is that it will require some discussion before it's worthwhile to create a PR, but I can take a stab at it if it would be helpful.
The text was updated successfully, but these errors were encountered: