graphql-server icon indicating copy to clipboard operation
graphql-server copied to clipboard

Prototype chain inheritance over Class inheritance

Open Vidlec opened this issue 6 years ago • 1 comments

https://github.com/kettanaito/graphql-server/blob/243fa4de34399a6217fe55b0d932c85cf5b2dd6c/source/schema/types/User/User.controller.js#L5

Hi! While it may be fine for this use case, I suggest using Prototype chain inheritance over Class inheritance

https://medium.com/javascript-scene/master-the-javascript-interview-what-s-the-difference-between-class-prototypal-inheritance-e4cd0a7562e9

Vidlec avatar May 22 '18 14:05 Vidlec

That is a brilliant point and a good article! Thank you.

After starting to learn functional programming I am considering to re-writing the architecture to use that paradigm. Looks like the most reliable one for me.

kettanaito avatar May 22 '18 15:05 kettanaito