private static void writeComplete(WebSocketWriter out, String operationId) {
        try {
            final String json = serializeToJson(ImmutableMap.of("type", "complete", "id", operationId));
            out.tryWrite(json);
        } catch (JsonProcessingException e) {
            logger.warn("Unexpected exception while serializing complete event. operationId: {}",
                        operationId, e);
            out.close(e);
        }
    }
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