gql.tada makes me miss GraphQL…

Поділитися
Вставка
  • Опубліковано 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 5 місяців тому +38

    5 years tada experience.

  • @ivanrenescorcia
    @ivanrenescorcia 5 місяців тому

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

  • @devtor7451
    @devtor7451 5 місяців тому +24

    this looks like lightweight Relay

  • @bugged1212
    @bugged1212 5 місяців тому +4

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

  • @vitalikda
    @vitalikda 5 місяців тому +1

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

  • @joejazdzewski
    @joejazdzewski 5 місяців тому +2

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

  • @LeeByronW
    @LeeByronW 5 місяців тому +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

  • @spicybaguette7706
    @spicybaguette7706 5 місяців тому +4

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

    • @oserodal2702
      @oserodal2702 5 місяців тому

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

  • @mithushanjalangan5132
    @mithushanjalangan5132 5 місяців тому +2

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

  • @curiouslycory
    @curiouslycory 5 місяців тому

    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.

  • @Bu7MaiD075
    @Bu7MaiD075 5 місяців тому +4

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

  • @swiclabc
    @swiclabc 5 місяців тому

    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.

  • @y7o4ka
    @y7o4ka 5 місяців тому +1

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

  • @avinashthakur80
    @avinashthakur80 5 місяців тому

    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.

  • @curiouslycory
    @curiouslycory 5 місяців тому

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

  • @Lemmy4555
    @Lemmy4555 5 місяців тому

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

  • @jly_dev
    @jly_dev 5 місяців тому

    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

  • @fcnealvillangca7943
    @fcnealvillangca7943 5 місяців тому +2

    Refactor Gang 😂

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

  • @lakhey8057
    @lakhey8057 5 місяців тому

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

  • @zomars
    @zomars 5 місяців тому +1

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

    • @gucciburg
      @gucciburg 5 місяців тому +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.

  • @proofit404
    @proofit404 5 місяців тому

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

  • @mailslurp
    @mailslurp 5 місяців тому

    You can even send email with graphql

  • @sunny7268
    @sunny7268 5 місяців тому

    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

  • @puopg
    @puopg 5 місяців тому +1

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

  • @alexleung842
    @alexleung842 5 місяців тому

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

  • @barkxd
    @barkxd 5 місяців тому

    Notification gang

  • @CarlosEstebanLopezJaramillo
    @CarlosEstebanLopezJaramillo 5 місяців тому

    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 5 місяців тому +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 5 місяців тому +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 5 місяців тому +1

    I hate graphql because I love graph theory

  • @muslim8622
    @muslim8622 5 місяців тому +1

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

    • @gucciburg
      @gucciburg 5 місяців тому +2

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

    • @deadchannel8431
      @deadchannel8431 5 місяців тому +2

      No code generation

    • @CoryTheSimmons
      @CoryTheSimmons 5 місяців тому

      ​@@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 5 місяців тому

      @@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 5 місяців тому

      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 5 місяців тому

    I avid string abuser 😬

  • @gFamWeb
    @gFamWeb 5 місяців тому

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

  • @hunterxg
    @hunterxg 5 місяців тому

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

  • @sunny7268
    @sunny7268 5 місяців тому

    why Apollo not enough for you guys?))

    • @gucciburg
      @gucciburg 5 місяців тому +2

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

    • @gadgetboyplaysmc
      @gadgetboyplaysmc 5 місяців тому

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

    • @warmbowski
      @warmbowski 5 місяців тому

      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 5 місяців тому +1

    Light node AND 4-space indentation 🤢

  • @BuyHighSellLo
    @BuyHighSellLo 5 місяців тому +2

    isn’t that just what relay already does?

    • @gucciburg
      @gucciburg 5 місяців тому +1

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

    • @Bu7MaiD075
      @Bu7MaiD075 5 місяців тому +2

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

    • @gucciburg
      @gucciburg 5 місяців тому +1

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

    • @Bu7MaiD075
      @Bu7MaiD075 5 місяців тому

      @@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 5 місяців тому

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

  • @UocLv
    @UocLv 5 місяців тому +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.

  • @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 5 місяців тому

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