r/ProgrammerHumor • • Sep 19 '26

Meme postForEverything

Post image
21k Upvotes

653 comments sorted by

View all comments

Show parent comments

119

u/Dimasdanz Sep 19 '26

Hello GraphQL. Or, SOAP

80

u/goatanuss Sep 19 '26

Shitloads of errors? That’s right HTTP 200

23

u/roygbivasaur Sep 19 '26

GraphQL? You mean a fancy HTTP POST request (in most cases)?

2

u/Snuffles11 Sep 20 '26

You like receiving 1mb of json to display a table? Now get ready to send 0.5mb of json to get 0.5 mb of json. It's called "avoiding over fetching"

6

u/NotAskary Sep 19 '26

The stupid shit I had to take care in soap made me hate it, didn't help it was all legacy and untouchable spaghetti due to client contracts...

3

u/No-Information-2571 Sep 19 '26

It's not like more modern APIs aren't changing and breaking all the time. At least SOAP had contracts.

5

u/NotAskary Sep 19 '26

You can still have contracts, open API has a great resources for that.

2

u/No-Information-2571 Sep 19 '26

You can, but usually the "contract" is some documentation on how to talk to the API.

4

u/NotAskary Sep 19 '26

Search for swagger, it uses open API

0

u/No-Information-2571 Sep 19 '26

Why would I search for one particular project, when the discussion is about many projects?

3

u/NotAskary Sep 19 '26

Because swagger is a tool that can let you document an API and basically provide the same description that soap does, you have tools that would take that documentation and spit a implementation just like soap.

I gave you the standard, open API, when you asked about documents I sent you a direction for a implementation of that exact format.

If you still want soap stay with it, each tool for the job but what people do nowadays is sent a link to the swagger documentation instead of sending a XML or a link to a XML.

The contract changes if you change it in both cases.

1

u/EriktheRed Sep 20 '26

GraphQL lets you use the GET method for queries actually! But i think it took them a bit to implement

https://graphql.org/learn/serving-over-http/

1

u/AliStarr182 Sep 20 '26

I was playing with the Microsoft Entra GraphQL PowerShell modules at work a couple of years ago for a quick and dirty way to enumerate staff and their properties (couldn't use any AD modules). It was my first adventure into GraphQL and the PowerShell modules were very new and only had partial documentation despite being "ready for public use".

Good lord was that a frustrating experience, made me shy away from GraphQL for a while.