question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I’d like the DTOs generated by graphql-java-codegen to optionally be “immutable”.

By “immutable” I mean that the generated classes do not have any setters. Very similar to to what Lombok does with its @Value annotation.

A generated class with this feature enabled should look like:

public class Person {
    // Everything as usual, except...
    // NO SETTERS IN HERE
}

If you approve the addition of this feature, I am happy to implement and PR it.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:17 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
lorenzleutgebcommented, Jun 19, 2020

Just to confirm: Starting from version 2, together with the feature described in #148, MapStruct can now target immutable DTOs and will instantiate them via the builder 🎊

1reaction
lorenzleutgebcommented, Jun 15, 2020

I think that generateImmutableModels (verb, adjective, noun) better fits other, already existing, names such as generateAsyncApi, so I’ll choose that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Immutable Definition & Meaning - Merriam-Webster
Immutable may describe something that is incapable of change, but the word itself—like all words—is mutable, both capable of and prone to ...
Read more >
Immutability Definition & Meaning - Dictionary.com
the state or condition of being unchangeable:These findings contradict previous myths about the genetic immutability of intelligence at birth.
Read more >
Immutability - Stanford Encyclopedia of Philosophy
The doctrine of divine immutability (DDI) asserts that God cannot undergo real or intrinsic change in any respect.
Read more >
Immutable object - Wikipedia
In object-oriented and functional programming, an immutable object (unchangeable object) is an object whose state cannot be modified after it is created.
Read more >
17 Synonyms & Antonyms for IMMUTABILITY - Thesaurus.com
synonyms for immutability · perpetuation · dependability · durability · permanency · stability ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found