You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: graphql-dgs-codegen-shared-core/src/main/kotlin/com/netflix/graphql/dgs/client/codegen/GraphQLQueryRequest.kt
Copy file name to clipboardExpand all lines: graphql-dgs-codegen-shared-core/src/test/kotlin/com/netflix/graphql/dgs/client/codegen/GraphQLQueryRequestTest.kt
+49
Original file line number
Diff line number
Diff line change
@@ -155,6 +155,55 @@ class GraphQLQueryRequestTest {
155
155
)
156
156
}
157
157
158
+
@Test
159
+
funserializeWithSelectionSet() {
160
+
val query =TestNamedGraphQLQuery().apply {
161
+
input["movie"] =Movie(123, "greatMovie")
162
+
}
163
+
val inputValueSerializer =InputValueSerializer(emptyMap())
164
+
val projectionSerializer =ProjectionSerializer(inputValueSerializer)
165
+
val selectionSet = projectionSerializer.toSelectionSet(MovieProjection().name().movieId())
166
+
val request =GraphQLQueryRequest(query, selectionSet)
167
+
val result = request.serialize()
168
+
assertValidQuery(result)
169
+
assertThat(result).isEqualTo(
170
+
"""query TestNamedQuery {
171
+
| test(movie: {movieId : 123, name : "greatMovie"}) {
0 commit comments