Introduction To GraphQL

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ต.ค. 2024

ความคิดเห็น • 50

  • @JohnIdlewood
    @JohnIdlewood 4 ปีที่แล้ว +13

    This video doesn't actually deals with .NET. It's just another video saying what a fantastic thing GraphQL is.

  • @mariacobretti
    @mariacobretti 4 ปีที่แล้ว +7

    what was said about OData is not quite true. If you have a data source that returns an IQueryable like cosmos sdk oder Entity Framework, the query will be resolved on the database. Aka not all the data is fetched and then filtered in the api app. In fact it is a bit of extra code to pass the query to the database in GraphQL

    • @Devrony
      @Devrony 4 ปีที่แล้ว +4

      You are right. I use ODATA a lot. Have been for years. What he said was not true about ODATA. It’s not just filtering. It’s CRUD over a Web API and out of the box it builds and executes SQL query at the database. You can customize to apply additional filtering at the API level. It’s not perfect by any means but very powerful. In it’s simplest form it’s extending Entity Framework capabilities over the Internet. Very good for exposing a relation DB out of the box. You can select which specific properties/columns to return, even with JOIN capabilities just like GraphQL. These are basically competing technologies. Yes implementation can be different but goals kind of the same. Like having SQL-esk capabilities over a Web/REST API so developers can be “expressive” about how to query data. But what about saving/deleting data? Querying is only part of capabilities. Let’s see some some in depth comparisons between these technologies. I know this is not about ODATA but I always like videos that compare with other technologies so developers can see what the pros/cons are.

    • @NishchalGautam
      @NishchalGautam 3 ปีที่แล้ว

      @@Devrony even though that wasn't true, what odata can't do is have a deep graph like graphql, with graphql, you can get data from hundreds of table if you ask for it, I don't think you can do it that efficiently with odata

  • @SameerKhan-S
    @SameerKhan-S 4 ปีที่แล้ว +16

    This is the best simple getting started video I've ever watched. Thank you.

  • @BenHayat
    @BenHayat 4 ปีที่แล้ว +12

    Ok guys, after watching OData videos, it "seems" like GraphQL might be a better/more powerful choice to use.
    However, the burning question is, how can GraphQL help on the server side? Let me explain.
    Do I still create a ton of Web API end points using EF/LINQ to fetch data on the server side to store tem in some sort of large collection and then feed it to GraphQL server side to filter thrugh?
    Or can GraphQL, bypasses create Web API and EF/LINQ and talk directly the DB (just like LINQ does) and create a better SQL script that is more efficient?
    PLEASE cover this notation of how can we also optimize the server part, so the server doesn't go down from to much workload?
    And when will the next session be?
    We should also talk about how to use GraphQL in Blazor server and client side.
    Thanks Jeremy!
    ..Ben

    • @Endomorphism
      @Endomorphism 4 ปีที่แล้ว

      Graphql is not orm.
      Graphql starts with schema.
      Schema know all types (entities) mutations (commands) and others.
      Graphql run on schema, its request can have two parts.
      Command
      Query
      Command is optional.
      In gql Commnd is called mutation.
      For example createOrder command
      its paramater will be orderItems
      Command is kind a like rpc.
      And it work almost like it.
      For querying u have to define how to get entity from db Its called queryType
      While querying it call parent entity query type then its childrens.
      For .net u can check hotchocolate graphql lib it has lots of features and flavors.

    • @Endomorphism
      @Endomorphism 4 ปีที่แล้ว

      Bcs graphql query query entities from parent to child.
      There will be n + 1 issue.
      To resolve it u have to provide dataLoaders.

  • @vvkim20
    @vvkim20 4 ปีที่แล้ว +9

    I am a big fan of keeping a simple solution for all however how to apply right authorization would be a challenge with GraphQL.

    • @ivankhm
      @ivankhm 4 ปีที่แล้ว +5

      I personally use graphql-shield in combination with jwt. For example you can store userId in token payload and if token is valid - fetch user permissions from database. Then allow or deny access to the specific query or mutation etc.

    • @icodefor
      @icodefor 4 ปีที่แล้ว

      @@ivankhm Or something like hasura which handles authorization very well

    • @NishchalGautam
      @NishchalGautam 3 ปีที่แล้ว

      so since everything goes to 1 place, you can add middleware which looks at JWT/any token, gets the user and puts that in context, now in your resolvers, you can use this user object to check for authentication, it's simple.
      even better, do federation, so your graphql-gateway will have several microservices, and gateway basically stitches those together and returns a data, and you can do the jwt parsing, making sure jwt aren't in a blocklist/blacklist etc can be done in the gateway layer. authentication is even better in GQL IMO.

  • @minhhieugma
    @minhhieugma 4 ปีที่แล้ว +2

    I don't think empower front-end developers to retrieve any data is appropriate:
    - What if we have more than one database. How do they use GraphQL to deal with? What are consequences here? Performance, data shapes ..
    - Usually, we do not have frankly ways to store data, sometime we store in SQL Server but actually it is JSON string in a nvarchar max column type
    - How to restrict what kinds of information they can get?

    • @ExtremeSwat
      @ExtremeSwat 4 ปีที่แล้ว

      - One Service - One Db, unless you get something complicated, right ?
      - SQL Server does support JSON columns, BUUUUT, you could be using Redis DB for caching if needed ?
      - Permissions/Claims being set @ each microservice level with some handling ?

  • @rodrigoramirez3870
    @rodrigoramirez3870 ปีที่แล้ว +1

    Great content!

  • @DamianWalczak
    @DamianWalczak 4 ปีที่แล้ว +5

    there is something odd about Brandon like he trying to hard to be a human

  • @bennyrodrigues7987
    @bennyrodrigues7987 4 ปีที่แล้ว +6

    Why are Microsoft guy's use Apple Mac OS instead of windows

    • @yahorsinkevich4451
      @yahorsinkevich4451 4 ปีที่แล้ว +1

      because it is new Microsoft, Just FYI, GraphQL is Facebook tech that does not have official Microsoft implementation for the .NET yet

    • @arpitbharti6245
      @arpitbharti6245 4 ปีที่แล้ว +2

      @@yahorsinkevich4451 Graphql is a language specification. There is no technology that Facebook owns, Microsoft can easily go ahead and implement it for .Net

    • @friendlyfox2189
      @friendlyfox2189 4 ปีที่แล้ว +1

      @@yahorsinkevich4451 there is hot chocolate, which is pretty good

  • @ssoltani498
    @ssoltani498 4 ปีที่แล้ว +5

    Nice introduction.

  • @positivevibrations5103
    @positivevibrations5103 2 ปีที่แล้ว +1

    Guys this was really fantastic! Thank you!

  • @thegautamnayak
    @thegautamnayak 3 ปีที่แล้ว +1

    simple and nice explaination. Thank You!

  • @The_Pavanputra
    @The_Pavanputra 3 ปีที่แล้ว

    the bald dude looks like stone cold steve austin :D

  • @AmanKumar-pb6ns
    @AmanKumar-pb6ns 3 ปีที่แล้ว

    Could you please share any article on Authorization in GraphQL with latest nuget package version 4.5.0

  • @superjohndogg
    @superjohndogg 4 ปีที่แล้ว

    Thanks this was informative!

  • @mrohailiqbal
    @mrohailiqbal 2 ปีที่แล้ว

    Really nice. Thanks guys and keep it up.

  • @ugwukelechi4138
    @ugwukelechi4138 3 ปีที่แล้ว

    This is what I was looking for, Thanks!

  • @lost-prototype
    @lost-prototype 3 ปีที่แล้ว

    Thanks for the video, guys!

  • @zolisawelani9338
    @zolisawelani9338 3 ปีที่แล้ว

    Thanks for this. It was quite exciting and I learnt a lot.

  • @shaznishiraz
    @shaznishiraz 2 ปีที่แล้ว

    Love the Simplicity 😍

  • @MohamedEmaish
    @MohamedEmaish 3 ปีที่แล้ว

    Great, thank you.

  • @TarunKumarSaraswat
    @TarunKumarSaraswat 2 ปีที่แล้ว

    Wow, so simple 👏

  • @erickabuchanga6759
    @erickabuchanga6759 3 ปีที่แล้ว

    Can you have GraphQL run parallel with REST API in one web application?

    • @NishchalGautam
      @NishchalGautam 3 ปีที่แล้ว +1

      yes, I'm doing that, so for the actual auth like login I want it to be rest, but I can still add more endpoint where it'll run graphql, it's quite simple to do so.

    • @erickabuchanga6759
      @erickabuchanga6759 3 ปีที่แล้ว +1

      @@NishchalGautam Thank you answering this very helpful for me, after watching your video am upgrading my application and I want it to be hybrid....using both REST for some functionalities and GraphQl for other things

    • @NishchalGautam
      @NishchalGautam 3 ปีที่แล้ว +1

      @@erickabuchanga6759 I'm glad I was of help, but it's not my video :)
      however I do advise you to look into graphql federation with apollo gateway, I think that'll win you over and won't care for rest api :)

    • @erickabuchanga6759
      @erickabuchanga6759 3 ปีที่แล้ว

      @@NishchalGautam Thank you for your advice. Appreciate

  • @amerbashoeb2106
    @amerbashoeb2106 4 ปีที่แล้ว

    Hello Bob Saget

  • @draqula004
    @draqula004 4 ปีที่แล้ว

    Please continue this series

  • @hamzakhalid9428
    @hamzakhalid9428 4 ปีที่แล้ว

    Guy works at Microsoft and has a Mac. Nice

    • @rickdeckard1075
      @rickdeckard1075 4 ปีที่แล้ว

      nice as in superghey....i'm still waiting for satya to bounce around on stage with a torn hamstring going "YEEAAHHHH!!!"

    • @SandorGonzalez
      @SandorGonzalez 4 ปีที่แล้ว +1

      it's a marketing strategy. They are saying: "we focus on providing the developers with the best tools, regardless of the platform they decide to develop on"

    • @viniciusmorgado9722
      @viniciusmorgado9722 ปีที่แล้ว

      every single video, same comment

  • @yusufmohamedsalh8321
    @yusufmohamedsalh8321 4 ปีที่แล้ว

    Thank you

  • @adamm2716
    @adamm2716 4 ปีที่แล้ว +1

    any plans for graphQL to accept colbol?

  • @maximcrabbe1637
    @maximcrabbe1637 4 ปีที่แล้ว +7

    This is the first video I ever downvoted here on the channel, and this comment will also be downvoted still I think educational video's like this should only use facts. And here is why: So how does GraphQL compare to OData: Yes look left, query yes it almost json but not really... ok (yes OData uses params it is a valid difference). Then he tries to explain how OData works, but what he realy does he starts talking out of his ass. OData has big flaws, but 'it hits 3 databases and then send everything while GraphQL will just do 1 call, that is total bullsh*t. With OData you should expose a IQueryable (I am not saying that it is a good practice but hey thats how you should do it) and with the given params and working with EF for example it will make a 'proper SQL query' (Or atleast as proper as GraphQL does if it would work with a SQL database and EF). PS: While we at my current company use OData, we will soon jump the GraphQL bandwagon (I am PRO GraphQL) which WILL BE an upgrade. Also I have no connecting to Hassan Habib.

  • @wstefano88
    @wstefano88 4 ปีที่แล้ว

    waiting for the second episode! thanks a lot

  • @bogdanvlas6026
    @bogdanvlas6026 3 ปีที่แล้ว

    very well explained!

  • @alinalin7379
    @alinalin7379 3 ปีที่แล้ว

    Microsoft guys using Mac ... ok That tells me a lot