Created
May 21, 2020 14:25
-
-
Save Marahin/868cb8d751b7a319a3940be5be791f33 to your computer and use it in GitHub Desktop.
increment safely in faunadb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update( | |
Select( | |
"ref", | |
Get( | |
Match( | |
Index("title_unique"), | |
"TITLE HERE " | |
) | |
) | |
), | |
{ | |
data: { | |
users_ok: Add( | |
Select( | |
['data', 'users_ok'], | |
Get( | |
Match( | |
Index("title_unique"), | |
"TITLE HERE " | |
) | |
) | |
), | |
1 | |
) | |
} | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment