• TheHottub@lemmy.world
    link
    fedilink
    arrow-up
    30
    ·
    7 months ago

    Love GraphQL, but oh man is it being over used at my company. Management sees success with one of our large apis, now all the little niche ones have to be migrated and everyone consuming them must migrate as well.

    I like it, but the small 2 endpoint APIs that haven’t changed in years, have small 5 field models and no related entities, has like 1 or 2 teams that consume them DO NOT need it.

    • jkrtn@lemmy.ml
      link
      fedilink
      arrow-up
      9
      ·
      7 months ago

      LOL, “hey guys this thing hasn’t changed in years, so we need you to convert your simple API request into a big ol’ POST describing the entire model.”

      • frezik@midwest.social
        link
        fedilink
        arrow-up
        8
        ·
        7 months ago

        It’s old, and therefore bad.

        We really need a cultural change in this industry. Something that sits there doing its job for a decade+ with little to no change should be seen as a success.

  • fubarx@lemmy.ml
    link
    fedilink
    arrow-up
    28
    ·
    7 months ago

    The argument in the blog post sounds like one of those technologies that says “it works great once you have a billion users! Just wait and see.”

    Tried it once. It was a testing nightmare, trying to catch all the varying edge cases. Gave up and never looked back.

    • deadbeef79000@lemmy.nz
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      7 months ago

      Bold of you assume that any workplace where technologies are dictated by management has any kind of testing that matters.

      Why are you testing that again? You tested that yesterday!

      Submits resignation

  • jkrtn@lemmy.ml
    link
    fedilink
    arrow-up
    21
    ·
    7 months ago

    GraphQL is so stupid about collections of objects. If you want uniform pagination for different types of objects you have to write separate types for each.

    I don’t like how it composes things together. Kindof awkward when the subportions of the query need variables. Nested objects are great to form the query to just what one needs but then extra steps to decompose into what you’ll actually have client-side.

  • Cyberflunk@lemmy.world
    link
    fedilink
    arrow-up
    14
    arrow-down
    3
    ·
    7 months ago

    Sounds like a bunch of people here don’t understand the graphql use case or implementation. I’ve used it projects and works no worse than other solutions, and met the requirement of not having to update tons of code when queries are refactored. It’s not right for everything, but the same is true for anything.

  • flakpanzer@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    7 months ago

    At my workplace, we use it for East-West traffic, especially the central Identity, Authentication and Authorization service which every other service needs to access, and it works great for that use case (Since it allows the downstream services to fetch information however they like). REST can do that too, but it will be cumbersome to say the least. Although GraphQL performance has come under scrutiny lately.

  • MajorHavoc@programming.dev
    link
    fedilink
    arrow-up
    23
    arrow-down
    28
    ·
    7 months ago

    “GraphQL got a lot of hype because it enabled building typesafe APIs with a better developer experience than any other API”

    Haha.

    No.

    The experience was awful.

    Come at me, type-safe bros. Your favorite tech still sucks.

    Actually, that’s true, across the board. Your favorite technology, it has serious flaws. Frankly, it sucks.

    Now get off my lawn.

    Unless it’s that medicine that prolonged your favorite grandparent’s life and quality. That technology is pretty great. But the rest still sucks.

    • Potatos_are_not_friends@lemmy.world
      link
      fedilink
      arrow-up
      11
      ·
      7 months ago

      Not sure why you’re downvoted. You’re not wrong.

      I say this as a member of my local GraphQL meetup group.

      It solves a lot of interesting problems with APIs at scale.

      But every time some hobbyist was like, “Is it worth it?” I constantly had to bite my tongue and shrug. It’s like teaching a whole new paradigm.

      And even though I think GraphQL is superior, it’s a lot to understand and most people probably won’t give AF. Fetching JSON works just fine for 99% of use cases.

      • FizzyOrange@programming.dev
        link
        fedilink
        arrow-up
        3
        ·
        7 months ago

        I think he’s being downvoted because he’s one of those “who needs type safety?” fools. And because of the general rambling nonsense. Yeah JSON works fine for 99% of use cases but that isn’t what he said.