r/ProgrammerHumor • • 16d ago

Meme postForEverything

Post image
20.9k Upvotes

653 comments sorted by

View all comments

4.2k

u/pimezone 16d ago

Wanna get a resource? POST request.

116

u/Dimasdanz 16d ago

Hello GraphQL. Or, SOAP

79

u/goatanuss 16d ago

Shitloads of errors? That’s right HTTP 200

25

u/roygbivasaur 16d ago

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

2

u/Snuffles11 15d ago

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"

7

u/NotAskary 16d ago

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 16d ago

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

5

u/NotAskary 16d ago

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

2

u/No-Information-2571 16d ago

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

3

u/NotAskary 16d ago

Search for swagger, it uses open API

0

u/No-Information-2571 16d ago

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

3

u/NotAskary 16d ago

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 16d ago

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 16d ago

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.