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
{{ message }}
Repository navigation
Commit 33b59d6
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -1238,6 +1241,62 @@ class ExecutableNormalizedOperationToAstCompilerTest extends Specification {
1238
1241
'''
1239
1242
}
1240
1243
1244
+
1245
+
1246
+
def"test query directive"() {
1247
+
def sdl ='''
1248
+
type Query {
1249
+
foo1(arg: I): String
1250
+
1251
+
}
1252
+
type Subscription {
1253
+
foo1(arg: I): DevOps
1254
+
1255
+
}
1256
+
input I {
1257
+
arg1: String
1258
+
}
1259
+
1260
+
type DevOps{
1261
+
name: String
1262
+
}
1263
+
1264
+
directive @optIn(to : [String!]!) repeatable on FIELD
1265
+
'''
1266
+
def query ='''subscription {
1267
+
foo1 (arg: {
1268
+
arg1: "Subscription"
1269
+
}) @optIn(to: "foo") {
1270
+
name @optIn(to: "devOps")
1271
+
}
1272
+
1273
+
1274
+
}
1275
+
'''
1276
+
GraphQLSchema schema = mkSchema(sdl)
1277
+
Document document =newParser().parse(query)
1278
+
ExecutableNormalizedOperation eno =ExecutableNormalizedOperationFactory.createExecutableNormalizedOperationWithRawVariables(schema,document, null,RawVariables.emptyVariables())
1279
+
1280
+
1281
+
when:
1282
+
def result = compileToDocument(schema, SUBSCRIPTION, null, eno.topLevelFields, eno.normalizedFieldToQueryDirectives, noVariables)
0 commit comments