mightyboss
mightyboss
TtRPC
Created by mightyboss on 4/25/2023 in #❓-help
Stuck trying to utilize useQuery to fetch some data on form submission
Im not sure why I didnt think of that initially to be honest, thanks for the insight
9 replies
TtRPC
Created by mightyboss on 4/25/2023 in #❓-help
Stuck trying to utilize useQuery to fetch some data on form submission
Ahh yes, that makes much more sense to me now
9 replies
TtRPC
Created by mightyboss on 4/25/2023 in #❓-help
Stuck trying to utilize useQuery to fetch some data on form submission
Sorry I prematurely sent the message before I was done explaining the scenario
9 replies
TtRPC
Created by mightyboss on 4/25/2023 in #❓-help
Stuck trying to utilize useQuery to fetch some data on form submission
The use case is for fetching data from a db only after form submission. SO basically what im doing is: The user is shown a page with some data where a section of the data is encrypted on the server using a passphrase supplied by the user. Initially, the page displays a form to enter the passphrase, then once the user submits the form with the correct passphrase, the form is replaced with the now decrypted information. On the backend, the procedure querys the database to fetch the data then decrypts with the supplied password and returns the now decrypted data back to the client. Im currently using a mutation for this, however I dont think this is right because im not really adding or changing the data here, only reading it. I would think that I utilize useQuery for this, however I obviously dont want to fetch the data until the user has entered the correct password. It seems like this should be relatively straight forward, but im having a hard time finding information on this use case that I can really get a grasp from.
9 replies