You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest a rework of the query route. Currently, the cypher string is passed through a URL path variable but do to URL encoding some character are lost in the process like the '+' character. So modifying the request to make the variables pass through the body of the request like bellow would solve those problems.
# Query endpoint@router.get('/q', response_model=Query, summary='Query the database with a custom Cypher string')asyncdefcypher_query(attributes: dict):
print(attributes["cypher_string"])
ifattributes["cypher_string"] isnotNoneandattributes["cypher_string"] !="":
withneo4j_driver.session() assession:
response=session.run(query=attributes["cypher_string"])
returnQuery(response=response.data())
else:
raiseHTTPException(
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
detail="Empty or null cypher string.",
headers={"WWW-Authenticate": "Bearer"})
The text was updated successfully, but these errors were encountered:
I suggest a rework of the query route. Currently, the cypher string is passed through a URL path variable but do to URL encoding some character are lost in the process like the '+' character. So modifying the request to make the variables pass through the body of the request like bellow would solve those problems.
The text was updated successfully, but these errors were encountered: