commons-fields: lightweight and GWT compatible alternative to GraphQL

Skip to first unread message

Gordan Krešić

Jun 27, 2021, 11:04:30 AMJun 27
Over the last year I've put up a simple lib^H^H^H design pattern for working
with partially initialized object graphs. It is intended to be used both
client side *and* server side, it's GWT compatible and provides some
additional functionalities over GraphQL (in addition to tons of
functionalities from GraphQL missing, of course).

For motivation and examples, see the Github wiki page.

Note: it isn't published and that was conscious decision: it is meant to be
used as *pattern*, customizing it for every particular project.

Another note: checkers getters (one that throw if a particular field isn't
initialized) works poorly with serialization libs. If you are using Jackson,
see FieldPropertyFilter in 'jackson' subproject and its usage in demo
subproject, but on the GWT side it's a bit more complicated, since neither
gwt-jackson nor domino-jackson support @JsonFilter.

I've created issue on this for gwt-jackson a long time ago, but nothing came
out of it:

So, for my own projects I'm maintaining (ugly) patched gwt-jackson available
here ('fields' branch):

For example on how to build own CRUDFieldsService implementations, see
additional project:

Which uses yet another private lib (turtles all the way down...):

If you prefer Hibernate/jOOQ or any other JDBC-alternative, it shouldn't be
hard to translate from commons-fields-sql (without
even looking at commons-sql) into some Hibernate/jOOQ alternative.

Comments welcome.


Reply all
Reply to author
0 new messages