SPARQL query construction with Retool widget values

I have to make REST calls to a triple store using SPARQL queries. SPARQL queries are similar to SQL but use braces, so the simplest SPARQL query would look like: SELECT * WHERE { ?s ?p ?o . }
If I want to construct a SPARQL query with the current value from 'select1', it would look like the following: SELECT * WHERE { {{select1.value}} ?p ?o .}, or some such. If I write it this way in the query editor the {{select1.value}} resolves, but the query fails with 404 errors. If I put the query in the resource the {{select1.value}} doesn't resolve and I get syntax errors. If I hard code a value in place of {{select1.value}}, in the resource, the query executes and returns valid results. I have also tried to construct the SPARQL query as a concatenated string as follows: "SELECT * WHERE { " + {{select1.value}} + " ?p ?o .}" but also got syntax errors for the quotes but the {{select1.value}} resolved (again, in the query but not in the resource). Clearly I do not understand the relationship between query and resource even though I thought I did, and of course I do not know what the syntactic requirements are for constructing a SPARQL query in Retool.

Does anyone know how to construct a query using syntax that requires embedded curly braces using Retool? Thank you.

Hey @jhodgesatmb, It looks like this is possible if you expand on your concatenated string idea and set the values of two Text Area components to the first and third parts of the concatenated string. You then can just concatenate the whole string within the {{ }} in the query input field.

You'd probably want to hide the Text Area Components.

Could that work for your use case?