gql.tada makes me miss GraphQL…

Поделиться
HTML-код
  • Опубликовано: 25 авг 2024
  • If gql.tada existed years ago, things might have turned out very different for me. This is a lot of why I loved tRPC bundled into a very convenient typescript plugin.
    LINK github.com/0no...
    MATT VID • Everyone's talking abo...
    My GraphQL Conf talk • The Right Size For Gra...
    Check out my Twitch, Twitter, Discord more at t3.gg
    S/O Ph4se0n3 for the awesome edit 🙏

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

  • @Chris-se3nc
    @Chris-se3nc 6 месяцев назад +38

    5 years tada experience.

  • @devtor7451
    @devtor7451 6 месяцев назад +24

    this looks like lightweight Relay

  • @bugged1212
    @bugged1212 6 месяцев назад +4

    Added this to my project last week and it's pretty awesome.

  • @joejazdzewski
    @joejazdzewski 6 месяцев назад +2

    The Typescript plugin feature is great and allows these type of features for language extension

  • @spicybaguette7706
    @spicybaguette7706 6 месяцев назад +4

    Typescript's type system is wild, it's literally a language on it's own

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

      Tbf, it's not hard to become Turing complete, just look up Rule 110

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

    Insane! pretty cool seeing new stuff coming, love learning new data-fetching/mutation patterns!

  • @Bu7MaiD075
    @Bu7MaiD075 6 месяцев назад +4

    I got my relay degree. I dont need lesser versions.

  • @LeeByronW
    @LeeByronW 6 месяцев назад +5

    gql-tada is such an impressive project (though I still wish it was called graphql-tada). Nice overview!
    It’s wild how much configurability that TS allows these days

  • @vitalikda
    @vitalikda 6 месяцев назад +1

    This tool is amazing! Looking forward to using it in my next project 👌

  • @y7o4ka
    @y7o4ka 6 месяцев назад +1

    "Be careful scrolling through their twitter profile" i'm dead

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

    We've been using zod to validate and type our GQL responses (manually building/maintaining schemas) but it's tricky because we don't want a single element failing to cause a whole response to error, especially when we consider the data to be optional but it is exceptionally difficult to track what data is required vs optional on a large scale. The unused decorator would be very helpful too.

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

    The DX is pretty much the same as with existing solutions. But it is really cool that you don't have to have a background codegen process running in order to achieve type safety.

  • @mithushanjalangan5132
    @mithushanjalangan5132 6 месяцев назад +2

    Whats your thoughts on Hono and Hono RPC (not graphql related), since you touched upon elysiajs

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

    IMO, when you have a frontend/backend that are tightly coupled, it makes sense to use t3/remix/etc.
    If you have an API that needs to be consumed by various clients (web app, native app, API users, etc), GraphQL is nice.
    I've been working on such an API for ~4 years now, and honestly graphql has been a nice experience

  • @blaydator
    @blaydator 5 месяцев назад

    Trpc looks amazing but I like GraphQL for the idea of not writing specific endpoints / procedures for each views, but just query data in the client in any shape I need.

  • @gFamWeb
    @gFamWeb 6 месяцев назад +4

    I think this is good, but I would have a few concerns: 1. RAM usage, 2. Introductions of non-standard API's, 3. Making your front-end your "SSOT" for your backend API shape (unless you have a monorepo or something), 4. Over-reliance on libraries to "magic away" complexity instead of letting developers work through it. (might be a little "back in my day"-y, but yeah)

    • @vladpoltorin6112
      @vladpoltorin6112 6 месяцев назад +2

      Can you elaborate on 3 point? It's the same og graqhql client, where you just don't need codegen for schema types

  • @puopg
    @puopg 6 месяцев назад +1

    For those of us using relay, we've been coding in 2050. Welcome to the future yall

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

    Going to test this vs apollo and see which one has better DX.

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

    Is it doing TS type inference on that string template everytime anything changes ?
    This is why probably my interests are leaning towards rust because here, we'll be doing heavy type inference and still struggle to achieve what those languages provide natively.

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

    They should use a template tag to avoid issues with the formatter.

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

    You can even send email with graphql

  • @zomars
    @zomars 6 месяцев назад +1

    How does this differ from GQless (now called GQty) ?

    • @gucciburg
      @gucciburg 6 месяцев назад +1

      GQty programmatically generates the GraphQL queries / mutations at runtime whereas GraphQL Tada just introduces type safety to the traditional way of defining graphql queries / mutations.

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

    If you follow apolli server guidelines is it that big deal to manage you backend? I was responsible for this topic, but as far i got it, it not that hard. Trpc is reqlly nice, but it is hard to manage on microservices

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

    I'm preferring graphql queries written in plain typescript (ex genql)

  • @fcnealvillangca7943
    @fcnealvillangca7943 6 месяцев назад +2

    Refactor Gang 😂

  • @thedoctor5478
    @thedoctor5478 6 месяцев назад +1

    I hate graphql because I love graph theory

  • @gosnooky
    @gosnooky 6 месяцев назад +1

    Light node AND 4-space indentation 🤢

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

    "TypeScript Language Service plugin" Wow! That's not something I've heard all that much.

  • @UocLv
    @UocLv 6 месяцев назад +2

    This is so STUPID! The moment you step out of basic querying, like using Fragments, it turns into spaghetti code and adds another layer of abstraction to your code. Another 'cool' JavaScript tool, with a cool demo, just ends up being trash underneath.

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

    I wonder if something like this is possible with OpenAPI 3?

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

    Don't you just add the #graphql comment after the backtick and it keeps the backtick in place and hints the IDE to highlight it with GraphQL syntax? I do that all the time, should I not?

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

    Is there way to make tada work with react query like graphql codegen doesa

  • @muslim8622
    @muslim8622 6 месяцев назад +1

    What's th benefit of this lib over Graphql code generator?

    • @gucciburg
      @gucciburg 6 месяцев назад +2

      There’s not much of an added benefit beyond skipping the code generation step

    • @deadchannel8431
      @deadchannel8431 6 месяцев назад +2

      No code generation

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

      ​@@gucciburg This... the codegen part is fine though. I'm not sure what the concern is. I never had problems with it on some pretty huge codebases.

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

      @@CoryTheSimmons I think theo is saying the benefit is the type feedback is immediate on edit and doesn't require a watch on the file save and the generation of files, but other wise, it's similar.

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

      code gen is so annoying. You have to set it up, it's another running process, you probably need it in CI/CD. Just awful. I just want my code to work.

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

    This is the same as Relay. What's new here?

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

    Notification gang

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

    why Apollo not enough for you guys?))

    • @gucciburg
      @gucciburg 6 месяцев назад +2

      GraphQL Tada isn’t a GraphQL client so it doesn’t replace Apollo-it just enables type safety for graphql documents.

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

      Yeah I figured it's like a graphql-codegen killer is it?

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

      Gql.tada would work really well with Apollo client, not exclude it. If you look at the example, you can replace Urql with Apollo client and it would work the same. It's just a language server that is generating TS types on the output of the graphql query wrapping function based on the graphql server's introspect query. (some times it's just a tagged template literal that looks like gql`query...`)

  • @BuyHighSellLo
    @BuyHighSellLo 6 месяцев назад +2

    isn’t that just what relay already does?

    • @gucciburg
      @gucciburg 6 месяцев назад +1

      Relay doesn’t add type safety to graphql documents and it’s not a replacement for relay

    • @Bu7MaiD075
      @Bu7MaiD075 6 месяцев назад +2

      @@gucciburgrelays does two things correctly type safety and caching. Dont spread nonsense.

    • @gucciburg
      @gucciburg 6 месяцев назад +1

      @@Bu7MaiD075 Relay relies on code generation-it doesn’t directly infer types from graphql documents.

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

      @@gucciburgthe relay compiler comes with watchman and a vscode extension. i never leave my tsx file and I get type safety/autocomplete, better fragment support and on save compilation.

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

      @@gucciburgwhile i get your point on what tada does. i dont see it as necessary when running relay maybe some other gql clients my find it beneficial.

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

    I avid string abuser 😬

  • @cristianmargineanu1458
    @cristianmargineanu1458 5 месяцев назад

    Can't you just put a "!" when you know you're gonna have it? You're the one making the query anyway 😉

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

    Light mode is shit lol, dark mode should be the default 😉