So a few people have asked why I have this snarky response. What is my problem with this service? Well, to be clear, it’s not an issue with GraphQL, it’s an issue with direct coupling with underlying datasources #thread

The service as advertised makes it simple to map a GraphQL definition against a database. Now, what’s the problem with this? Well, the devil here is in the detail. But fundamentally it comes down to how important information hiding is to you.
Information hiding is the concept whereby you expose as little information as possible to external parties. Anything you expose over a boundary becomes part of the contract between provider and consumer.
Anything I hide inside a boundary can be changed freely. Anything I expose must be maintained if I want to maintain backwards compatibility.
Why is backwards compatibility important? If I break compatibility with external consumers of an interface, then such a change can lead to the need to lock step releases of consumer and producer, or even worse accidental breakages in prod.
The concept of information hiding goes back a long way - it was originally defined by David Parnas and shared in his paper “On the criteria to be used in decomposing systems into modules
David Lorge. Parnas
Carnegie Mellon University“ https://t.co/qjhfrXkHtI
Encapsulation in OO when used well is an example of information hiding in action.
Now, in a distributed system, being able to make changes safely and with confidence is important. Having a clear understanding about what changes can be made safely, without causing compatibility issues with clients is vital if you want independent deployability.
Now, this is why when we talk about Microservices we place so much importance on not allowing external parties to directly access a microservice’s internal database - no information hiding is possible.
Aren’t we hiding information by wrapping a database with a GraphQL endpoint? Well, the devil is in the detail. A common pattern I’ve seen is a 1:1 mapping - think putting getters and setters on an object to access private fields. That’s not information hiding.
Now with something like a GraphQL projection, if you’re careful, you can provide a degree of information hiding - you can decide not to expose some parts of the underlying data model.
The golden rule here is never expose anything until someone actually needs it. Think outside in - what exactly do external parties need? This allows you to be selective in what you expose. Too many people think inside out, and expose everything in case it *might* be needed.
Now, let’s assume you’ve done a great job in being selective in terms of what you allow to be accessed. Well, then your GraphQL endpoint is just a wrapper on a database. Where does the logic live that defines what the allowable state transitions are? In the client.
What happens if you have more than one client? You have to either duplicate that logic or else share that logic (eg shared library). The concern here is that you might have different views about what an acceptable transition is in different clients.
What happens if different clients don’t agree about what acceptable transitions are? Fun stuff! By fun I mean painful, expensive things.
So, my concern with offerings that allow you to wrap database in GraphQL endpoints is partly it makes information hiding more difficult, and that with multiple clients makes it difficult to manage state in a consistent, correct manager.
I’d have the same concerns about other approaches like ODATA. It’s not a GraphQL issue specifically.
Sidebar: the (brief) article linked compares GraphQL and REST, which is a common thing to do but misses a HUGE amount of what REST is about. Arguably of course, if you just think of REST as being JSON over HTTP, then although that’s not correct, I understand the confusion.
So, by all means make use of GraphQL, but be aware of the challenges that can occur when you just map database tables to GraphQL endpoints.

More from For later read

You May Also Like

The chorus of this song uses the shlokas taken from Sundarkand of Ramayana.

It is a series of Sanskrit shlokas recited by Jambavant to Hanuman to remind Him of his true potential.

1. धीवर प्रसार शौर्य भरा: The brave persevering one, your bravery is taking you forward.


2. उतसारा स्थिरा घम्भीरा: The one who is leaping higher and higher, who is firm and stable and seriously determined.

3. ुग्रामा असामा शौर्या भावा: He is strong, and without an equal in the ability/mentality to fight

4. रौद्रमा नवा भीतिर्मा: His anger will cause new fears in his foes.

5.विजिटरीपुरु धीरधारा, कलोथरा शिखरा कठोरा: This is a complex expression seen only in Indic language poetry. The poet is stating that Shivudu is experiencing the intensity of climbing a tough peak, and likening

it to the feeling in a hard battle, when you see your enemy defeated, and blood flowing like a rivulet. This is classical Veera rasa.

6.कुलकु थारथिलीथा गम्भीरा, जाया विराट वीरा: His rough body itself is like a sharp weapon (because he is determined to win). Hail this complete

hero of the world.

7.विलयगागनथाला भिकारा, गरज्जद्धरा गारा: The hero is destructive in the air/sky as well (because he can leap at an enemy from a great height). He can defeat the enemy (simply) with his fearsome roar of war.
Fake chats claiming to be from the Irish African community are being disseminated by the far right in order to suggest that violence is imminent from #BLM supporters. This is straight out of the QAnon and Proud Boys playbook. Spread the word. Protest safely. #georgenkencho


There is co-ordination across the far right in Ireland now to stir both left and right in the hopes of creating a race war. Think critically! Fascists see the tragic killing of #georgenkencho, the grief of his community and pending investigation as a flashpoint for action.


Across Telegram, Twitter and Facebook disinformation is being peddled on the back of these tragic events. From false photographs to the tactics ofwhite supremacy, the far right is clumsily trying to drive hate against minority groups and figureheads.


Declan Ganley’s Burkean group and the incel wing of National Party (Gearóid Murphy, Mick O’Keeffe & Co.) as well as all the usuals are concerted in their efforts to demonstrate their white supremacist cred. The quiet parts are today being said out loud.


The best thing you can do is challenge disinformation and report posts where engagement isn’t appropriate. Many of these are blatantly racist posts designed to drive recruitment to NP and other Nationalist groups. By all means protest but stay safe.