Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_errorsAsMap method is not implemented to handle collection [VajramGraphql] #306

Open
shivangipandey opened this issue Dec 9, 2024 · 0 comments
Milestone

Comments

@shivangipandey
Copy link

shivangipandey commented Dec 9, 2024

for 'AbstractGraphQlModel' -> _errorsAsMap method is not implemented to handle collection :

if (o instanceof AbstractGraphQlModel<?> graphQlModel) {
    Map<String, Object> errorsAsMap = graphQlModel._errorsAsMap();
    if (!errorsAsMap.isEmpty()) {
        if (map == null) {
            map = new LinkedHashMap();
        }
        map.put(s, errorsAsMap);
    }
}

Should be implemented as below :

dataModel._values().forEach((key, value) -> {
  if (value instanceof Collection<?> collection) {
    processCollectionErrors(errorMap, key, collection);
  } else if (value instanceof AbstractGraphQlModel<?> nestedModel) {
    processModelErrors(errorMap, key, nestedModel);
  }
});
@RamAnvesh RamAnvesh changed the title _errorsAsMap method is not implemented to handle collection _errorsAsMap method is not implemented to handle collection [VajramGraphql] Feb 2, 2025
@RamAnvesh RamAnvesh added this to the v9 milestone Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants