Skip to content

Commit

Permalink
Servlet 10.1.0 adds path info to subscription exception fix graphql-j…
Browse files Browse the repository at this point in the history
  • Loading branch information
oliemansm committed Dec 20, 2020
1 parent 0631b00 commit cdb0a89
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class StockTickerRxPublisher {

private static final Logger LOG = LoggerFactory.getLogger(StockTickerRxPublisher.class);

private final Flowable<StockPriceUpdate> publisher;

public StockTickerRxPublisher() {
Expand Down Expand Up @@ -57,7 +55,7 @@ private void emitStocks(ObservableEmitter<StockPriceUpdate> emitter,
try {
emitter.onNext(stockPriceUpdate);
} catch (RuntimeException e) {
LOG.error("Cannot send StockUpdate", e);
log.error("Cannot send StockUpdate", e);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ public BigDecimal getStockPrice() {
}

public BigDecimal getStockPriceChange() {
return stockPriceChange;
return null; //stockPriceChange;
}
}
10 changes: 0 additions & 10 deletions example-graphql-subscription/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,3 @@ spring:
name: graphql-subscription-example
server:
port: 9001

graphql:
servlet:
subscriptions:
websocket:
path: /subscriptions

graphiql:
cdn:
enabled: true
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ type StockPriceUpdate {
dateTime : String
stockCode : String
stockPrice : Float
stockPriceChange : Float
stockPriceChange : Float!
}

0 comments on commit cdb0a89

Please sign in to comment.