GraphQL Basics – Fun Fun Function


Good Monday morning! Today, we are going to look at some GraphQL basics. I am MPJ and you are watching Fun Fun Function Okay, so what is GraphQL? I personally think of GraphQL as the replacement for REST. With GraphQL, instead of these POST, PUT and GET stuff We have a little query language that is slightly more expressive It allows us to get exactly the data that we want and no know more. And stuff like that. Mind you, not everyone will agree with me that it will replace REST but Here goes my prediction of the future: GraphQL is going to mostly replace REST.

About the author

Comments

  1. OK, so your hilarious opener is the first one of these tutorial videos I didn't jump over. That was hilarious! Really enjoyed this!

  2. Just watching the intro alone made me adamant that I want to do what you are doing – but in polish. And since you did a video just about that some time ago (behind the scenes one) I feel blessed now. Look what you have done. Are you happy? 😛

  3. I am at 34 minutes in but I question the "efficiency" when you are still reading the entire xml REST response in your JavaScript application.

  4. What's your opinion about makeExecutableSchema from https://www.apollographql.com/docs/graphql-tools/generate-schema.html?

  5. I enjoy how you explain things 'on the fly' by showing whole process from a to z. Your struggles show that we all are just humans. Therefore such video to me is much more valuable than "graphql explained in 5minutes" which is short and saturated, but … like … whaaaaaaat….

  6. Are you all js these days or do you still do OO (I remember you mentioned you came from OO in one of your vids)? If so, thoughts on Java 8…?

  7. What you are doing at ~13 is to set a graphqlHTTP middleware on each request that will reach /graphql endpoint 🙂 . To answer the question at the same moment of the video 😀

  8. All of the questions after a 'node init' drive me crazy. Try typing 'node init -f' to get the defaults without the questions. I loved the GraphQL video. It was my first introduction to the topic. Just like all your other videos, it was fantastic. Thank you so much for sharing this. I appreciate your efforts more than you can know.

  9. Hint: I am not sure about on Mac, but on windows Ctrl-` will toggle the integrated terminal more easily. Maybe try Cmd-`.

  10. That was fun to watch, I started working with GraphQL about 2 months ago, but using PHP on the backend. I'm convinced it's the way to go. I'll be watching episode 2 tomorrow. And obviously I've subscribed. 🙂 I'm convinced that Heisenberg comes into play when it comes to typing on a keyboard. The more it's observed the worse it gets.

  11. You don't always have the video I'm looking for, but when you do I always choose yours.

    This is just the best format and delivery, and the editing is perfect. Yours are basically the only programming related videos I've found that don't drag. Great work!

  12. i followed your video and implementing the graphql with lots of pauses and rewinds. Now I have a better understanding of GraphQL, please make more code along videos like this. Thank you very much!

  13. God vid! I like your presentation style 🙂

    Also, you might want to install something like Spectacle to move your windows around: https://www.spectacleapp.com

  14. allowing clients to make adhoc queries this way is not scalable – you lose http caching. Done right, REST is able to cache most endpoints giving way to massive scalability. adhoc queries from client apps is an anti-pattern and veering from the primary vision of http (documents located at urls) always proves fatal for technologies that do so and graphql is just yet another flash-in-the-pants example of this type of ignorance.

  15. Thanks for the tutorial! However, I have a question, it's posted here with code snippets: https://stackoverflow.com/questions/48770507/how-to-inflate-graphql-items-before-resolving-fields

  16. You're brave to do live coding like this. I love it. You need to apply xpath queries to the parsed xml before turning into json object. You will then be the all mighty god of scheme conversions between xml and graphql 🙂

  17. Awesome! thanks for this video. Would you think that "proxy" perhaps would be a better word than "replacement" regarding REST APIs?

  18. طريقة عمل GraphQL server باستخدام Nodejs و Expressjs https://www.youtube.com/watch?v=mXuNlIqRrMg

  19. I LOVE graphQL.
    Well… until the moment that I realized that you cannot request/return a hashmap.
    Since then, I just like it and wait until it fills up this important gap.

  20. dear mpj, can you please tell me what is that fancy flashlight thing what you are using to read and present small pieces of code

  21. Hey mpj, any reason to prefer these graphql-js constructors over native schema syntax with buildSchema? The former seems way more verbose, and I’m wondering what the benefits are.

  22. Well I came out of this video learning two awesome things, quokka and graphQL Thanks!
    btw nice VueJS hair

  23. Nice video (as always)
    Nice hair (as always)
    Nice Windows shirt 🙂
    For some reason, your face & beard reminds me of Tony Stark. Y'know… billionaire, genius, playboy, philanthropist.

    Keep it up with the awesome content! 😉 Really and sincerely appreciate you and your work.

  24. I hope you will read my comment.

    When you focus on things you are explaining with the bright circle animation, the background becomes a little bit darker and when you finish explaining with that circle the background goes back to its original brightness and that causes a flashing (disturbing) background effect so that one couldn't concentrate on the content.

    I hope you change that in the future. nevertheless thank you for your effort. Content is 1A 👍👍

  25. Unfortunately this is what I get when I send any of the queries you mentioned:

    {
    "errors": [
    {
    "message": "Non-whitespace before first tag.nLine: 0nColumn: 1nChar: I",
    "locations": [
    {
    "line": 2,
    "column": 3
    }
    ],
    "path": [
    "author"
    ]
    }
    ],
    "data": {
    "author": null
    }
    }

    Can you update the repo: https://github.com/mpj/fff-graphql-goodreads to resolve those issues?

  26. Hi MPJ, what's that plugin that shows the size of a package gzipped? Sorry if this is something obvious or feature of VSCode, I am not familiar with VSCode.

    Also, why don't you use nodemon?

  27. Nice tuto..perfect for my current project…
    How can we scrap this data and keep the JSON at our server in case it goes down or the schema changes?

  28. 6:10 Great explanation! ☑️ There is no query language built into REST. It’s just we request this “author” and here you get everything. There’s no contract built into REST- so you’ll have to build it from scratch and every API will build theirs differently – so it will not be automatically transferable

  29. Hi MPJ , Since you have touched the topic of GraphQL , why not have a video about RESTful APIs . Restful APIs sometimes are misunderstood and way too abstracted to understand. You have been awesome in explaining complex programming concepts. RESTful would be a value addition. Topics like 'what' , 'why' , 'how' of RESTful APIs . Looking forward to it 🙂

    https://youtu.be/pspy1H6A3FM?t=1018 helped me quite a bit to understand, but reaching out to you to make a video

  30. Anyone knows why does GraphiQL return that ""String cannot represent value: { $: { nil: "true" } }" error at the beginning of the results panel on the right?

    I think it has something to do with the fact that some books don't have an isbn as MPJ says at some point in the video. In case it's so… does anyone know what "should be done" to solve it? (e.g. checking if the isbn is undefined and depending on that, returning a particular value)

  31. If anyone could tell me how to resolve for null isbn, it's throws an error for String cannot represent value:{$:{nil:"true"}}

  32. Hey mpj you have a cool way of teaching, only that I watch your video at 1.5x speed even while live coding.

  33. I'm getting a read ECONNRESET error after 17:25 step….i've created my own API key from goodreads. Any ideas?

  34. can someone explain to me why is he saying Rest is not handling query specification ? I'm confused , like it's perfectly possible ta have very specific queries with mysql or so , am I missing the point ?

  35. {
    "errors": [
    {
    "message": "Non-whitespace before first tag.nLine: 0nColumn: 1nChar: I",
    "locations": [
    {
    "line": 2,
    "column": 3
    }
    ],
    "path": [
    "author"
    ]
    }
    ],
    "data": {
    "author": null
    }
    }

    Which file should i change in order to get rid of the error?

  36. Hello, nice video, good to have your opinion on it 🙂
    I was wondering what was your visual studio code setting that shows you inline the error with those checkbox-like on the left?

Leave a Reply

Your email address will not be published. Required fields are marked *