Introduction To GraphQL

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024

Комментарии • 50

  • @SameerKhan-S
    @SameerKhan-S 4 года назад +16

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

  • @JohnIdlewood
    @JohnIdlewood 4 года назад +13

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

  • @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.

  • @positivevibrations5103
    @positivevibrations5103 2 года назад +1

    Guys this was really fantastic! Thank you!

  • @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

  • @ssoltani498
    @ssoltani498 4 года назад +5

    Nice introduction.

  • @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.

  • @thegautamnayak
    @thegautamnayak 3 года назад +1

    simple and nice explaination. Thank You!

  • @rodrigoramirez3870
    @rodrigoramirez3870 Год назад +1

    Great content!

  • @draqula004
    @draqula004 4 года назад

    Please continue this series

  • @shaznishiraz
    @shaznishiraz 2 года назад

    Love the Simplicity 😍

  • @lost-prototype
    @lost-prototype 3 года назад

    Thanks for the video, guys!

  • @mrohailiqbal
    @mrohailiqbal 2 года назад

    Really nice. Thanks guys and keep it up.

  • @ugwukelechi4138
    @ugwukelechi4138 3 года назад

    This is what I was looking for, Thanks!

  • @AmanKumar-pb6ns
    @AmanKumar-pb6ns 3 года назад

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

  • @zolisawelani9338
    @zolisawelani9338 3 года назад

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

  • @The_Pavanputra
    @The_Pavanputra 3 года назад

    the bald dude looks like stone cold steve austin :D

  • @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 ?

  • @TarunKumarSaraswat
    @TarunKumarSaraswat 2 года назад

    Wow, so simple 👏

  • @MohamedEmaish
    @MohamedEmaish 3 года назад

    Great, thank you.

  • @superjohndogg
    @superjohndogg 4 года назад

    Thanks this was informative!

  • @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

  • @yusufmohamedsalh8321
    @yusufmohamedsalh8321 4 года назад

    Thank you

  • @adamm2716
    @adamm2716 4 года назад +1

    any plans for graphQL to accept colbol?

  • @amerbashoeb2106
    @amerbashoeb2106 4 года назад

    Hello Bob Saget

  • @wstefano88
    @wstefano88 4 года назад

    waiting for the second episode! thanks a lot

  • @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

  • @bogdanvlas6026
    @bogdanvlas6026 3 года назад

    very well explained!

  • @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.

  • @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

  • @DamianWalczak
    @DamianWalczak 4 года назад +5

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

  • @alinalin7379
    @alinalin7379 3 года назад

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