Building GraphQL APIs in C# - Brandon Minnick - NDC Oslo 2021

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • GraphQL is an exciting new API architecture that enables huge performance benefits over REST APIs.
    But what is GraphQL? Why is it better than REST? And how do you create a GraphQL API in C#.
    Join me as we learn all of this and more!
    - Introduction to GraphQL
    - Difference between REST & GraphQL
    - C# libraries for building GraphQL APIs
    - How to create a GraphQL API in C#
    Check out more of our featured speakers and talks at
    ndcconferences...
    ndcoslo.com/

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

  • @zeric_
    @zeric_ Год назад +5

    We installed graphql on our c# webapi and holy crap, it's such an improvement over using rest for our angular development. We use it mainly for querying data and still have our rest apis living alongside it for put, post, patch and delete operations.
    Having the ability to declare which properties to return in the payload without having to update the endpoints is the killer feature for me. This minimized the response payloads significantly. We also avoid having to run additional deployments on the backend

  • @user-sv3fz3pg4z
    @user-sv3fz3pg4z Год назад

    Well explained! thanks!! This video helped me build my first hot chocolate graphql service in no time (1 -> 2 hours). Looking forward to build my first graphql client

  • @muhamedkarajic
    @muhamedkarajic 2 года назад +4

    Tried this today and the long loading screen for the localhost/graphql was just a bug in the presentation, it loads up in a second by me.

  • @jamesbowring9528
    @jamesbowring9528 6 месяцев назад

    I am going to follow this presentation through to see what benefits graphql has, because I restrict columns in rest and have options to show embedded objects and collections, especially if you obtain data through a post, rather than a get and define your filters and columns in the body. I am certainly not calling one endpoint for a user and then calling another for other related data, when that data can already be embedded. Or is it just me with this?

  • @ONESTTEFTEO
    @ONESTTEFTEO Год назад

    Please provide the link for slides in the description

  • @o0Zuel0o
    @o0Zuel0o 2 года назад +15

    GraphQL does not use Rest, "You don't know what you''re talking about.." - only a reflection on your comment. That's like saying Soap is not dead because Rest uses Soap. They all use the HTTP Protocol that has a method POST, or GET, or Put etc.. HTTP protocol uses TCP/IP protocol, and GraphQL, Rest, Soap are protocols themselves on the HTTP protocol.

    • @diegoronkkomaki6858
      @diegoronkkomaki6858 2 года назад +5

      I think you meant to say "HTTP protocol", not HTML.

    • @o0Zuel0o
      @o0Zuel0o 2 года назад +3

      @@diegoronkkomaki6858 you are totally right, and I am a total idiot. lol

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

      @@o0Zuel0o Kind of funny, guess for him there was no "edit" function. Haven't watched everything cause I was familiar with GraphQL but this really creates false definitions and misconceptions in the community - so I'm glad you pointed out that mistake.

    • @CabbageYe
      @CabbageYe Год назад +2

      Rest and graphql are not protocols

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

    There is a lot of hand waving here when he talks about connecting to RDBMS and/or existing REST services. Making random queries perform well is not trivial and involves a lot of design work. I'm not disparaging graphql but someone taking this on should dig deeper into how they will retrieve data efficiently.

    • @cburys
      @cburys 11 месяцев назад +1

      I agree.
      I'm not experienced in graphQL, but watching this makes me think you would just build a huge database query. You'd be pulling all columns for all related tables even if I only wanted two columns from one table. Yes, there's less data being sent from the web host to the client, but there's more data sent from DB to the web host. The database gets git harder than needed too.
      I was expecting there to be work conditionally grabbing what was requested. Instead it's just a library that filtered out unwanted properties before sending a response back to the client.
      I'd only want to do this on some very light queries. It's kind of cool, but it's not as cool everyone makes it sound.

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

    ODATA is pretty nice and already does these things, doesn't it?

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

      OData is more REST with query ability. GraphQL is one Endpoint and query whatever you want.

  • @Leo-tf7gu
    @Leo-tf7gu Год назад +2

    POST is HTTP thing not REST "thing". LOL. Good content otherwise.

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

      I almost shut it down when he said that but the rest of the presentation is decent