private static void writeError(WebSocketWriter out, String operationId, List<GraphQLError> errors)
            throws JsonProcessingException {
        final List<Map<String, Object>> errorSpecifications =
                errors.stream().map(GraphQLError::toSpecification).collect(Collectors.toList());
        final Map<String, Object> errorResponse = ImmutableMap.of(
                "type", "error",
                "id", operationId,
                "payload", errorSpecifications);
        final String event = serializeToJson(errorResponse);
        logger.trace("ERROR: {}", event);
        out.tryWrite(event);
    }
This only works reliably if maybeMap is from Json, as maps(objects) in Json
can only have string keys.
graphql/src/main/java/com/linecorp/armeria/server/graphql/GraphqlWSSubProtocol.java