-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix things in the fastapi tutorial #8398
base: master
Are you sure you want to change the base?
Conversation
Docs preview deploy❌ Docs preview deployment failed for commit a9d2c04: https://edgedb-docs-dzi5guwbt-edgedb.vercel.app (Last updated: Mar 7, 2025, 20:18:01 UTC) |
|
1f5da88
to
b64c823
Compare
b64c823
to
b9e0597
Compare
Co-authored-by: Aleksandra <[email protected]>
@@ -116,19 +113,24 @@ with semantic search-based cross-chat memory. | |||
Once the server gets up and running, we can make sure it works using FastAPI's | |||
built-in UI at <http://127.0.0.1:8000/docs>_, or manually with ``curl``: | |||
|
|||
.. note:: | |||
To pretty-print results in this and all following cURL examples, you can use ``jq``, by piping the output to it. `jq <https://jqlang.org/>`_ is a lightweight and flexible command-line JSON processor that, among other things, formats responses with proper indentation. However, using it is optional for this tutorial. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good idea, however, we should also consider encouraging users to test endpoints using the built-in Swagger UI instead.
It runs the same exact curl commands, and it also pretty prints them. The only issue is that it's not something copy-pasteable, hence all the bash commands across the tutorial
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm I am not sure how do u mean to encourage users to use swagger ui/redoc? we can mention that this is possible somewhere in the tutorial
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean we could use most of the space in this note to direct people to localhost:3000 and explain that they can do those same curl requests there through the GUI. And then also mention jq for those terminal addicts that don't know what a browser is.
|
||
|
||
.. edb:split-section:: | ||
|
||
This created the ``app/sample_data/inserts.edgeql`` file, which we can now execute | ||
using the CLI like this: | ||
This created the ``app/sample_data/inserts.edgeql`` file, which we can execute using the CLI: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we can remove
{"id": "862de904-de39-11ef-9713-4fab09220c4a"}
{"id": "862e400c-de39-11ef-9713-2f81f2b67013"}
{"id": "862de904-de39-11ef-9713-4fab09220c4a"}
{"id": "862e400c-de39-11ef-9713-2f81f2b67013"}
from below.
07.03.2025: Even now whenever I use "gel" in HN queries to HN I get responses that there's nothing about gel, querying edgedb works. So not sure should we use gel or edgedb when searching HN.
@elprans I still didn't read the whole tutorial. I fixed the code so that it runs, and I fixed wording at places. I think it needs more work, and it can probably be updated to be shorter.