Describe the bug
In our codebase we are using FieldDefinition.Builder like:
builder.inputValueDefinition(inputValueDefinition);
with current master (2020-11-10T10-26-00-07ca7ee, commit 07ca7ee) we have:
java.lang.UnsupportedOperationException
at graphql.com.google.common.collect.ImmutableCollection.add(ImmutableCollection.java:246)
at graphql.language.FieldDefinition$Builder.inputValueDefinition(FieldDefinition.java:210)
IMHO the cause is that in the copy constructor we have this:
this.inputValueDefinitions = existing.getInputValueDefinitions();
whereas should be like this:
this.inputValueDefinitions = new ArrayList<>(existing.getInputValueDefinitions());
because it is a builder and it is supposed to be mutable.
To Reproduce
Use of FieldDefinition.Builder.