I think the importance of the code lies in the following part:
For me the most relevant thing is to be able to work with points, polygons and lines and I think that changing the geometryType and spatialRel is a good way, but I'm not sure yet
Would you like to know how to explain this process for points and lines?
The parameters outlined in the code from the screen capture setup the request to query the feature service. How the other questions are being auto filled is by using pulldata("@json") extracting specific pieces from the response of the query request.