Skip to content

Commit

Permalink
Merge branch 'master' into graphql-java-deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
kilink authored Jan 18, 2024
2 parents 67cead4 + 835e63f commit 0e15628
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ jobs:
python -m pip install --upgrade pip
if [ -f scripts/requirements.txt ]; then pip install -r scripts/requirements.txt; fi
- uses: actions/[email protected].2
- uses: actions/[email protected].3
id: gradle-wrapper-cache
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradlewrapper-${{ hashFiles('gradle/wrapper/*') }}
restore-keys: ${{ runner.os }}-gradlewrapper-

- name: Cache Gradle packages
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle

- name: Maven cache
uses: actions/[email protected].2
uses: actions/[email protected].3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nebula-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
with:
distribution: 'zulu'
java-version: 8
- uses: actions/[email protected].2
- uses: actions/[email protected].3
id: gradle-cache
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/gradle/dependency-locks/*.lockfile') }}
restore-keys: |
- ${{ runner.os }}-gradle-
- uses: actions/[email protected].2
- uses: actions/[email protected].3
id: gradle-wrapper-cache
with:
path: ~/.gradle/wrapper
Expand Down
4 changes: 2 additions & 2 deletions graphql-dgs-platform/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ dependencies {
version { require("2.7.0") }
}
api("io.projectreactor:reactor-core") {
version { require("3.4.22") }
version { require("3.6.1") }
}
api("io.projectreactor:reactor-test"){
version { require("3.4.22") }
version { require("3.6.1") }
}
// CVEs
api("org.apache.logging.log4j:log4j-to-slf4j:2.22.1") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.netflix.graphql.dgs.subscriptions.websockets

import com.fasterxml.jackson.core.JsonProcessingException
import com.fasterxml.jackson.databind.ObjectMapper
import com.netflix.graphql.dgs.DgsQueryExecutor
import com.netflix.graphql.types.subscription.*
Expand All @@ -30,6 +31,7 @@ import org.slf4j.event.Level
import org.springframework.web.socket.TextMessage
import org.springframework.web.socket.WebSocketSession
import org.springframework.web.socket.handler.TextWebSocketHandler
import java.io.UncheckedIOException
import java.util.*
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.CopyOnWriteArrayList
Expand Down Expand Up @@ -110,7 +112,11 @@ class WebsocketGraphQLWSProtocolHandler(

override fun onNext(er: ExecutionResult) {
val message = OperationMessage(GQL_DATA, DataPayload(er.getData(), er.errors), id)
val jsonMessage = TextMessage(objectMapper.writeValueAsBytes(message))
val jsonMessage = try {
TextMessage(objectMapper.writeValueAsBytes(message))
} catch (exc: JsonProcessingException) {
throw UncheckedIOException(exc)
}
logger.debug("Sending subscription data: {}", jsonMessage)

if (session.isOpen) {
Expand Down

0 comments on commit 0e15628

Please sign in to comment.