GraphQL with Apollo Server 2.0
Vložit
- čas přidán 13. 06. 2018
- Learn how to build an API using GraphQL with Apollo Server 2.0, using Firestore as a backend data source. github.com/arjunyel/firestore...
- Get more episodes at angularfirebase.com/
- GraphQL graphql.org/learn/
- Apollo 2.0 www.apollographql.com/docs/ap... - Věda a technologie
If you are a web developer nowadays, this is THE channel to follow!
Thank you Mateja! Spread the word :))))
Ha ha, I always follows ways he shows in his videos.
this guy deserves much more subs
just discovered it.. decent.. there's many good channels...
Pretty sure mongodb hasn't replaced postgres tho.. .
There's myriad of tools, people use different tools.. that's it..
just like in construction for example.. some people use husqvarna, some people use makita...
tools are just tools ...
any developer who talks too much about this tool and that tool... is a sure sign of a shitty coder...
Word
i love how you explain everything that matters in such a concise way
Will GraphQL replace REST in the near future? I'm not sure, but GraphQL is definitely a fun way to build an API
Malik Bagwala GraphQL MAY not be worth in some instances.
How about the performance? if GraphQL needs another server (apollo) to route queries then that adds extra latency. That's not the case with REST API. If it's performance hit then graphQL can't replace REST API anytime in future.
@@1gouravgg I don't understand the "another server" phrase. Apollo is a GraphQL server that recursively maps the resolvers to the requested query (or mutation or subscription). There is just a single server just like an express server or any rest API server. A REST API server maps the routes to the respective controllers. How does the Apollo server add up extra latency as it is doing a similar thing?
I must say your videos are a gem and maybe the most highly under-rated amongst all the Angular based videos on CZcams!! Keep up the good work!!!
+Sagar Thank you, really appreciate your feedback :)
Awesome, I absolutely love the video format!
Great to hear that, thanks for watching :)
In terms of client-side performance, would getting a firestore collection doc and a subcollection doc be faster than a graphql query to two collections? Or would it cost (client-side performance) the same as they both have two api calls anyway?
I just hit like even before watching bro, thanks for this,
As I'm about to go angular soon.
Greetings from Tanzania
Thank you, I've always wanted to visit Tanzania :)
Angular Firebase, that's amazing bro, please don't hesitate to visit or ask anything about Tanzania (I'll help you for insights), I reside in Bagamoyo (very historical site), please welcome, take a tour in this majestic land, Tanzania
Awsome work! waiting for more ;)
Love it, more more Angular + GraphQL
I love these videos more than I should.
Thank you!
thanks for all the good and new content
Thank you for watching :)
Hold on, hold on, hold on!!! Holy Shit, Jeff! I had to literally pause at 10 seconds man! That intro was SIIICCCKKK!!!! Very cool, man! Ok, back to watching the rest of the video :)
Haha, thank you Rey :)
Nice tutorial! It could be also useful to show how to execute a mutation, for example adding another tweet for a user.
Great tutorial. I've always been wanting try graphQL but I'm still not sure how to provide apis that are not meant for fetching the data? There could be apis that are meant to trigger something or mutate a data store. How does that work if you have a GraphQL server ?
This is really important for security as well. I found this one fairly popular social media app which has a very open API. Users (and any posts tagged with a location) had full coordinates returned via the internal API (found using a packet tracker). What was worse was that, until recently, you could POST (as in a POST request) to your profile that you were a member of the app team (i.e. an employee of the company who makes the app), and you would get a badge on your profile. They've since fixed that, but I have found you can still POST other things to your profile that you shouldn't be able to change. Something tells me they just added an if statement to ignore that specific "app team" parameter from any POST requests.
haha!
Thank u for this awesome video
Thanks for watching Abhishek
GraphQL is doing to REST what json did to xml.
That is a good analogy, I agree.
it's doing to REST what REST did to SOAP
This is cool
Making things go light weight xD
Sounds interesting thanks !!!
It's definitely something to put on your radar.
How do you get that dark mode version of GraphiQL? It looks a lot nicer & more updated than GraphiQL.
Matt Campbell is called graphql playground, built in in apollo server
Watching this for the first time and that tweet in the beginning had me shook haha (the bootcamp Im currently in is only teaching REST with PostgreSQL)
Thank you so much for this video Angular Firebase!
When do you think you'll do part 2? Really excited to see how to implement GraphQL in Angular. I have used it with React, but I really want to implement it into Angular projects as well.
Yes, part 2 is done, working on the video now :)
While I do think there's a good chance that Graphql will replace most use cases of Rest, I pretty much use Graphql exclusively now, but Mongo did not in any way replace Postgres, I'd say we've got even more of a large selection now graph databases are starting gain popularity.
I agree, his tweet had the right idea but not the best comparison. I think XML vs JSON might be a slightly better one.
You should make a video about graphQL and serverless (cloud functions)
Please more about QraphQL With Angular ... like authentication , ... Maybe full list of videos on pro account ... Thanks
Is it better to do it on firebase functions now?
we need an updated video :3
Lol that starting quote. Postgres is arguably doing better than Mongo.
Glad I'm not the only one that thought that. Not to mention, why the Postgres comparison specifically?
I don’t really get why would you compare two different kind of DBs in general? They are both doing fine and they are both better at different things. It really depends on the project you’re building. I could understand a "What PostgreSQL did to MySQL“ analogy but comparing 2 different db systems is hilarious
Is Apollo Server free to use, self hosted?
which theme r u using
Great tutorial! 💯
You seem to paste in every line of code instead of typing it character for character, which looks very cool and is less distracting because there are no typos.
How do you that? 😃
I think he saved his file, deletes lines one by one and then just reverse the deletion during recording...I may be wrong but that's how I would do that !
my guess is that he deletes line by line from bottom to top, and then undo it one by one
Hey Jeff thanks man, are you still using angular 5?
I'm using Angular 6 mostly now.
Awesome Thanks, is it possible you can do a video on Angular 6 Updates? i want to upgrade but i dont want to end up with a nest of bugs lol
Hi Carlton, I would follow the official update guide (update.angular.io/). Most changes are not that breaking, the hardest part is rxjs update. They have prepared tool to make it easier, they say it will update automatically... it won't but it will help. Good luck with your update, it really isn't that scary ;)
medium.com/@jeroenouw/upgrade-to-angular-6-4520e46c682b Here is a great article to do that, hope that helps !
Thanks Jeff. nice video. Have you done any videos on xAPIs particularly getting user analytical data from education apps such as H5P into an LRS or Google analytics? just interested in how to do it. great work mate
No, I have not done anything like that. What's your use case? Sounds like it could make an interesting topic
Ok. I'll message you on Slack.
Hi Jeff. I messaged you directly on Slack with some details, Did you get it?
I did, sorry for the delay. I wanted to research some of the tools you listed. I will get back to you there tomorrow.
Hello Jeff, Abdul-Razak here again. Great video as usual. How is the student sponsorship program coming along? I am still hanging in here :)
Are you on the Slack channel? Send me a direct message - I think I can help you out :)
how do you copy paste???
That was really helpful , but what if we have form of multiple search inputs to search for certain car for example between two amounts with model year, color, price, where user can choose either one input, bunch or all of theme at the same time?
It really depends. You might handle most of that filtering client side or use a full text search service like algolia.
0:09 There should not be predictions but compelling thoughts on how different technologies address a problem efficiently, or not. There will always be a case in which REST is an optimal solution, as well as a case for GraphQL. As well as for C, C++, Perl, React or Typescript; you name it. Pretending that a Graph (form a math definition) will replace REST, is simply comparing peaches and bananas, they are fruits, and you eat them, but they are not the same thing.
wait when did MongoDB replace PostgreSQL?
Hey man, can you do a tutorial about apollo client + ssr next.js 13? Great vids btw!
I can not put it to work. Gives the following error:
“ node_modules/apollo-env/lib/polyfills/array.d.ts:1:1 - error TS1084: Invalid 'reference' directive syntax. 1 /// “
Can someone help me?
Hi, Did you managed to solve it? I run into the same problem in one of my project.
I think graphQL doesn't offer full functionality completely for now. Maybe I am wrong...
Files uploading, access restriction, auth with google, etc....
Also as a newbie I have lot of quesitons like express-graphql or apollo-express graphql?
Is it working okay with ngRx?
What about websockets for example?
Also strong typed Schemas, which mostly duplicate mongoose Schema...
Looks like it solves one problem but creates hundred of new ones...
I am not a hater but I really try to understand when to use graphQL?
I agree with you actually, it will create more problems that it solves in many apps. You should have (1) large relational APIs (i.e. Yelp!) that (2) may need to combine several data sources on a single request and (3) have multiple client apps that drive the development decisions.
Didn't explain well enough how the resolver knows how to return the the tweets for a given user. And how that mapping occurs.
Aww baby Jeff
Hey all, Please tell me which is the best kind (Firebase vs Heroku)
That's e-commerce web
firebase
Wait, Mongo replaced PostgreSQL? Cough... maybe for a use case or two, but replaced? LUL.
That was a joke - GQL is cool, but probably overkill in most situations.
Apollo Server 2.0 or GraphQL Yoga?
But technically isn't this more work? It's like an API for your API.
Depends on what kind of problems you want to solve... you can use GraphQL/Apollo-Client to combat different Problems - You can use it handle local application-state ( replace something like redux ), solve over-/under-fetching ( as you make one request to your api and can request exactly the fields you need to display - afterwards if you request the same/or data containing already requested fragments - it comes from cache ), Stiching together multiple sources and apis ( Multiple Rest Apis/Databases etc. and Query them as One ). Also it's very powerful that you can adapt your queries in the frontend, without the need to adapt it on database-level. Furthermore their are a tools to generate an graphql-layer over existing rest-apis and mocking tools you can use to simulate your database before implementation and for testing...
holy shiet, "MongoDB replaced PostgreSQL". dude's got some nerve.
MongoDB didn't replace PostgreSQL.. they have completely different use cases..
which is actually apt. GraphQL/REST have completely different use cases. But I think, like mongo, a lot of projects are going to use graphQL like its the future and make it much harder on themselves and end up with much shittier code because they didn't realize the pros/cons.
Microsoft might disagree as when they were tasked with building a worldwide scalable server they ultimately went the document based nosql route and decided to allow for SQL apis to interface with it.
I don't think that solved the n+1 problem...
ReST in peace..
I switched from MongoDB to PostgreSQL...
he uses kde plasma.
MongoDB replacing postgresql HAHAHHAHAHAHAHH
Umm,
Improvements could be made, Its angular + Firebase + Cloud fns + apollo, the topic and focus of this video starts to fade and its too much to absorb and focus on,
If its about Apollo, expect Angular there shouldn't be much other than that. :)
the graphql-express-server seems far better than this apollo server. The code can be more easily organized and understood in the graphql-express-server than this.
If you are replacing PostgreSQL with MongoDB you are a mediocre developer.
No you are not
WHY THE FUCK EVERYONE HAS MADE A VIDEO SHOWING HOW TO RETRIVE DATA !! PLEASE MAKE A VIDEO ON HOW TO UPLOAD DATA !!!!!!!!!! PLEASE I AM IN URGENT NEED ON HOW TO GET THAT WORK DONE.
how tf is he just pasting code. it's annoying af.
It's a patented method that I describe in Episode 100. It's either that, or make this video 1hr long.
Angular Firebase link?
czcams.com/video/V0HW6h0Jzog/video.html start watching around 3:40
It's not ideal... but I've shot a lot of screencasts myself, and you've got to speed up the typing or everyone will cry with boredom.