Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Return POJO instead of LinkedHashMap #1855

Copy link
Copy link
@bugy

Description

@bugy
Issue body actions

Dear all,
I'm trying to use graphql-java for loading a graph of in-memory java objects and doing some transformations on them (e.g. exporting to CSV).
When I use graphql.execute(ExecutionInput), it always provides a list of nested LinkedHashMaps
However, I would prefer having results as POJOs.

I dig a little bit into the code, and found, that the results are aggregated in AbstractAsyncExecutionStrategy#handleResults. So I decided to implement a custom strategy, which would build POJO directly.
However, I don't see any way, how to know, which output class it should be. I could take it from the current ExecutionPath (which is available in ExecutionStrategyParameters), but handleResults doesn't have this parameter.

So, my questions are:

  1. Is there any way to get current ExecutionPath in handlerResults?
  2. Is there any other way to produce POJO instead of LinkedHashMap?

PS thanks a lot for the wonderful library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.