FastAPI and GraphQL - build your first API

  Рет қаралды 23,630

Very Academy

Very Academy

Күн бұрын

Пікірлер: 47
@dhruvpatel90
@dhruvpatel90 Жыл бұрын
Amazing tutorial. If you're coming here in 2023, here's a couple of things you need to know. 1. graphql is no longer accessible through starlette, use from starlette_graphene3 import GraphQLApp 2. app.add_route is nolonger valid, use app.mount 3. to get the GUI, you'll need make_graphiql_handler() from starlette_graphene3. Your imports should be: from starlette_graphene3 import GraphQLApp, make_graphiql_handler your route method should be: app.mount("/graphql",GraphQLApp(schema=graphene.Schema(query=Query, mutation=PostMutations),on_get=make_graphiql_handler()))
@veryacademy
@veryacademy Жыл бұрын
Thanks for the update!
@naxanj
@naxanj Жыл бұрын
Thank you very much. People like you makes the world better place.
@angeltodorov2634
@angeltodorov2634 11 ай бұрын
Another note from my headbanging - you would also need the 3.x version of graphene-sqlalchemy by running pip install --pre "graphene-sqlalchemy" as the standard install gets version < 3.
@cubano_sin_filtro_en_brasil
@cubano_sin_filtro_en_brasil 3 жыл бұрын
I'm a Cuban Brazilian and found this tutorial incredible, you are the best!!!
@veryacademy
@veryacademy 3 жыл бұрын
Thanks 🙏
@romanviktordvorak76
@romanviktordvorak76 2 жыл бұрын
Díky!
@mabagoury
@mabagoury Жыл бұрын
This is great. I like tutorials that explore how to build a real project showing how different technologies interact and integrate. Hope to see more.
@luisfranciscoyanezblanco4517
@luisfranciscoyanezblanco4517 2 жыл бұрын
If you installed starlette > 0.17 .0 you should install starlette-graphene3, so to use "from starlette_graphene3 import GraphQL Api" instead "from starlette.graphql import GraphQLApp"
@joerude8
@joerude8 2 жыл бұрын
idk why, but it didnt work so i just used fastapi=0.66.0
@pipi_delina
@pipi_delina 2 жыл бұрын
OK... Will try when I sit down
@tonyromano1394
@tonyromano1394 3 жыл бұрын
Couldn't find another tutorial like this anywhere. Thanks for doing this!
@veryacademy
@veryacademy 3 жыл бұрын
Thanks Tony.
@jdpenuliar8339
@jdpenuliar8339 2 жыл бұрын
The starlette-graphene3 is not being recognized by FastAPi() anymore. Been looking at some docs but it seems it was deprecated? Specifically on the GraphQLApp part. Any suggestions or updates?
@davishek7
@davishek7 3 жыл бұрын
Wow, asked you last time. thanks for this again.
@gtv3582
@gtv3582 3 жыл бұрын
Your videos are freaking amazing, im surprised u only have 17k followers.
@veryacademy
@veryacademy 3 жыл бұрын
This channel is just for fun and to help those who might find it. Thank you
@pipi_delina
@pipi_delina 2 жыл бұрын
There has been some form of a refactor of the Graphene Code, I will be very happy if you do another video based on the current specifications.
@abdora7mandaw0ud73
@abdora7mandaw0ud73 3 жыл бұрын
An awesome video as always. Hope best man 😉
@justacasualdeveloper
@justacasualdeveloper 3 жыл бұрын
Awessome Video as always. Thanks man 😊.
@veryacademy
@veryacademy 3 жыл бұрын
My pleasure!
@Haggy2k3
@Haggy2k3 2 жыл бұрын
Is there a similar Video with MongoDB?
@shalineesharma8704
@shalineesharma8704 Жыл бұрын
starlette.graphql has been deprecated. What can I use in place of it such that all other dependencies remain just the same ?
@Mathias-cq3zo
@Mathias-cq3zo 3 жыл бұрын
Here we go again!!! Yes!!!
@elysium-h3f
@elysium-h3f Жыл бұрын
Great tutorial,but i'm getting this error "cannot import name 'connection_from_list_slice' from 'graphql_relay.connection.arrayconnection" ,do you have any idea about why this is happening or how i could solve it?
@pipi_delina
@pipi_delina Жыл бұрын
I am asking again if you can give us a new update on this... cant seem to figure out why graphene and starlette are not resolving although they are installed
@munivinayk
@munivinayk 3 жыл бұрын
Hello. I have used your approach and made minor changes to be able to use it from the react front end. For Fast API i have added CORS middleware and calling them using fetch fucntions in react. However, since i have added this middle ware to the Fastapi, i am getting the following error: "SLL SYCALL Error: EOF detected". This would happen, when i keep the session idle for few mins. I will have to always restart the docker to be able to resume the operations back. do you happen to know what would be causing this error?
@alihusham1560
@alihusham1560 3 жыл бұрын
Oh man I love you so much
@kunyan1946
@kunyan1946 3 жыл бұрын
Why is it true that when I log in to PGadmin, I am prompted to check my password when I am told that my password is compromised
@ericsalesdeandrade9420
@ericsalesdeandrade9420 2 жыл бұрын
Real helpful thank you. What version of Python are you using?
@ericsalesdeandrade9420
@ericsalesdeandrade9420 2 жыл бұрын
the graphene library is incompatible with Python 3.7+ so need to keep that in mind for the venv and the Docker File.
@veryacademy
@veryacademy 2 жыл бұрын
In the tutorial, I can’t say it was a while back sorry
@abrarshahid3930
@abrarshahid3930 3 жыл бұрын
Your videos are just like Diamonds to me!!!!!! Btw, I have a question. May I know your opinion about Django vs FastAPI?
@veryacademy
@veryacademy 3 жыл бұрын
Hi Avrar - sorry, I don't really have a general opinion - happy to discuss selecting the right tools for the task at hand.
@anthonyvetrenko6519
@anthonyvetrenko6519 3 жыл бұрын
It's super awesome, keep going! May you please also show an example with relations in DB and how to manage them in graphql?
@veryacademy
@veryacademy 3 жыл бұрын
Hi Anthony - I will do one more for now. Next up a simple example of user logins - will add a simple category - post FK relation.
@anthonyvetrenko6519
@anthonyvetrenko6519 3 жыл бұрын
@@veryacademy Thank you ❤️
@AcademyOmen
@AcademyOmen 3 жыл бұрын
Shweet 😃
@veryacademy
@veryacademy 3 жыл бұрын
Will add users and security onto it next 👍 - bound to be asked 😂
@nournote
@nournote 2 жыл бұрын
ImplEment?
@Jafar801
@Jafar801 4 ай бұрын
Shouldn't you start by explaining what GraphQL is and why it's used before diving into its implementation in FastAPI?
@veryacademy
@veryacademy 4 ай бұрын
@@Jafar801 sounds like you might have found some prerequisites. 👍
@pipi_delina
@pipi_delina 2 жыл бұрын
Looks like startlette. Graphene is no more available
@nice-je3mp
@nice-je3mp 2 жыл бұрын
I thank you, sir. I'm trying to create a real-time exchange So I'm going to make websocket api I've been thinking about the fastpai websocket -> GraphQL subscription -> kafka(resdis) ->celery ->db architecture and I'd like some advice!
@ancient-one
@ancient-one 2 жыл бұрын
gRPC would be the way to go
@ancient-one
@ancient-one 2 жыл бұрын
I suppose you can just get rid of the whole dotenv stuff, and use env_file: in the docker-compose.yml, would drastically simplify things
@manutorres3241
@manutorres3241 2 жыл бұрын
Right, but according to his previous rest version of the video, he wanted the app to be able to run locally as well.
FastAPI User Token Authentication
52:12
Very Academy
Рет қаралды 13 М.
How to build a FastAPI app with PostgreSQL
27:37
Eric Roby
Рет қаралды 61 М.
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
NestJs Course for Beginners - Create a REST API
3:42:09
freeCodeCamp.org
Рет қаралды 1,7 МЛН
GraphQL, tRPC, REST and more - Pick Your Poison
17:12
Theo - t3․gg
Рет қаралды 109 М.
Why You NEED To Learn FastAPI | Hands On Project
21:15
Travis Media
Рет қаралды 171 М.
Build an Entire App with a Single API: GraphQL Python Tutorial
12:27
FastAPI Celery, Flower and Docker
29:33
Very Academy
Рет қаралды 58 М.
The Hidden Cost Of GraphQL And NodeJS
28:35
ThePrimeTime
Рет қаралды 200 М.
GraphQL vs REST: What's The Difference And When To Use Which?
26:57
Vue.js Course for Beginners [2021 Tutorial]
3:39:56
freeCodeCamp.org
Рет қаралды 1,3 МЛН
Building a CRUD API with FastAPI, GraphQL, and PostgreSQL
32:12
lemoncode21
Рет қаралды 6 М.
Ansible 101 - Episode 1 - Introduction to Ansible
1:03:43
Jeff Geerling
Рет қаралды 560 М.
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН