Skip to content

GraphQL Extensions #67

@bkuberek

Description

@bkuberek

Regarding execution of graphql here:

Map<String, Object> result = new HashMap<>();
if (executionResult.getErrors().size() > 0) {
result.put(GRAPHQL_RESPONSE_ERROR_KEY, executionResult.getErrors());
logger.error("Errors: {}", executionResult.getErrors());
} else {
result.put(GRAPHQL_RESPONSE_DATA_KEY, executionResult.getData());
}
exchange.getResponseHeaders().put(Headers.CONTENT_TYPE, "application/json");
exchange.setStatusCode(StatusCodes.OK);
exchange.getResponseSender().send(Config.getInstance().getMapper().writeValueAsString(result));

GraphQL also provides an extensions, perhaps we should add it.

    if (executionResult.getExtensions().size() > 0) {
      result.put("extensions", executionResult.getExtensions());
    }

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