gql.tada makes me miss GraphQL…

Поделиться
HTML-код
  • Опубликовано: 24 фев 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-co/gql.tada
    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 4 месяца назад +38

    5 years tada experience.

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

    this looks like lightweight Relay

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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.

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

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

  • @LeeByronW
    @LeeByronW 4 месяца назад +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

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

    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 4 месяца назад

    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.

  • @landonyarrington7979
    @landonyarrington7979 4 месяца назад

    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

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

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

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

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

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

    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.

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

    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

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

    Refactor Gang 😂

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

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

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

    You can even send email with graphql

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

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

    • @gucciburg
      @gucciburg 4 месяца назад +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.

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

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

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

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

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

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

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

    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?

  • @gFamWeb
    @gFamWeb 4 месяца назад +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 4 месяца назад +2

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

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

    I hate graphql because I love graph theory

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

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

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

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

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

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

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

      No code generation

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

      ​@@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 4 месяца назад

      @@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 4 месяца назад

      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.

  • @domthefounder
    @domthefounder 4 месяца назад

    I avid string abuser 😬

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

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

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

    why Apollo not enough for you guys?))

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

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

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

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

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

      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...`)

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

    Light node AND 4-space indentation 🤢

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

    Notification gang

  • @UocLv
    @UocLv 4 месяца назад +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.

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

    isn’t that just what relay already does?

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

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

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

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

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

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

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

      @@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 4 месяца назад

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

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

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

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

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