4
ltlian
4y

You're kidding. You know how React, GraphQl, and Jest are made by facebook. You would think that Jest then would be framework of choice for mocking gql queries and responses for a React app. And you would be wrong. You "can, but-", depending on your implementation - ours being based on official sources - not without contorting and duplicating everything related to the query implementation at which you are barely even testing the app itself. We're using named imports from .gql files, for those familiar.

Don't you hate it when it turns out the guy going "nah tests were too hard, we didn't bother" was right.

Comments
  • 1
    He / she is right.
    Until, eventually, somebody accidentally breaks something and it's a shitshow to resolve.

    If a test had guaranteed that implementation, well.
    At least it would be telling you 🤣

    Of course, this is no guarantee that somebody might also just delete that test...
  • 3
    I was not aware Graph was made by FB.

    I keep running into it as an alternative for API usage, but never bothered because cURL or HTTPS or REST or SOAP are more preferred for me.

    But now that I know its an FB product I never have to fuck with it ever.

    Fuck Facebook and fuck that robot lizard mother fuckerburg.
  • 1
    @HiFiWiFiSciFi I quite enjoy GQL (usual disclaimer: it's not "better" than rest and just solves different problems etc) and it helps to know that FB doesn't maintain a specific implementation, it's just a way of structuring your data.

    React can fuck right off, though.
Add Comment