Open wwwy3y3 opened 5 years ago
In v3.0.0
(https://github.com/Canner/gqlify/releases/tag/v3.0.0), we add set
field to array field of create/update mutation.
createUser(data: {
members: [{name: 'wwwy3y3'}]
}) {...}
createUser(data: {
members: {
set: [{name: 'wwwy3y3'}]
}
}) {...}
updateUser(data: {
members: [{name: 'wwwy3y3'}]
}) {...}
updateUser(data: {
members: {
set: [{name: 'wwwy3y3'}]
}
}) {...}
Is your feature request related to a problem? Please describe. For issues below:
34: Atomic operation on nested array in GraphQL API
35: Support
firestore.FieldValue.serverTimestamp()
Also for future possible features like:
Describe the solution you'd like We should somehow encapsulate the payload that passed to create/update methods in
dataSource
.Implementaion detail
API
getData(): Record<string, any>
Should directly replace the original values with payload got from
getData()
getArrayOperations(): ArrayUpdateOperation[]
getArrayOperations()
will provide atomic operations likeadd
,set
,remove
todataSource