Hello,
Ever since I started using Retool I can't stop feeling the word "query" is not the right one for the Resource and JavaScript queries.
Let me explain:
The word "query" is associated with an operation that only reads data and is not changing it.
Here a few cases where Retool breaks this expectation:
-
If you use GraphQL, you create a mutation by creating a Resource query
-
If you use REST and action type is PATCH/PUT/POST, this is still a Resource query
-
The JavaScript queries can do basically anything. They are just async functions. They can delete/add/update data without any restrictions.
Wouldn't it make more sense to use the following names instead:
Am I missing something and the current names actually make complete sense? Let me know what you think
I agree there is some overuse of the word Query
.
Update/Insert/Delete queries do database changes so I would call anything that reads/writes to an external source (database or API) a Query
. Fully defensible terminology.
However, Javascript Queries
are misnamed and should be Javascript functions
or actions
.
It is hard to name things correctly out of the gate, especially when you know there will be a lot of evolution. Changing the names now will help new devs and new users coming on board (we assume and hope Retool is still young with many multiples of growth left.)
But there is a lot of documentation and forum posts that refers to the old names making it difficult (but most def not impossible) to change course now.
But if Retool decides to change JS Queries
to JS Functions
or something else, I volunteer to go change all of my forum posts to the new lingo.
The other terminology change I would make is switching temporary state
variables to Global
variables which is more accurate to what they are in actual use.
I'm used to GraphQL and that's probably the reason I find it strange to create something that called a query
whenever I need to do a mutation.
I agree JavaScript actions
and JavaScript functions
would be better names than JavaScript queries
.
I would call temporary state
just state
.