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
ScalarLeaves.subselectionRequired=Validation error ({0}) : Subselection required for type ''{1}'' of field ''{2}''
69
69
#
70
70
SubscriptionUniqueRootField.multipleRootFields=Validation error ({0}) : Subscription operation ''{1}'' must have exactly one root field
71
-
SubscriptionUniqueRootField.multipleRootFieldsWithFragment=Validation error ({0}) : Subscription operation ''{1}'' must have exactly one root field with fragments
72
71
SubscriptionIntrospectionRootField.introspectionRootField=Validation error ({0}) : Subscription operation ''{1}'' root field ''{2}'' cannot be an introspection field
73
-
SubscriptionIntrospectionRootField.introspectionRootFieldWithFragment=Validation error ({0}) : Subscription operation ''{1}'' fragment root field ''{2}'' cannot be an introspection field
72
+
SubscriptionRootField.forbidSkipAndIncludeOnSubscriptionRoot=Validation error ({0}) : Subscription operation ''{1}'' root field ''{2}'' must not use @skip nor @include directives in top level selection
74
73
#
75
74
UniqueArgumentNames.uniqueArgument=Validation error ({0}) : There can be only one argument named ''{1}''
Copy file name to clipboardExpand all lines: src/main/resources/i18n/Validation_de.properties
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -60,9 +60,9 @@ ScalarLeaves.subselectionOnLeaf=Validierungsfehler ({0}) : Unterauswahl für Bla
60
60
ScalarLeaves.subselectionRequired=Validierungsfehler ({0}) : Unterauswahl erforderlich für Typ ''{1}'' des Feldes ''{2}''
61
61
#
62
62
SubscriptionUniqueRootField.multipleRootFields=Validierungsfehler ({0}) : Subscription operation ''{1}'' muss genau ein root field haben
63
-
SubscriptionUniqueRootField.multipleRootFieldsWithFragment=Validierungsfehler ({0}) : Subscription operation ''{1}'' muss genau ein root field mit Fragmenten haben
64
63
SubscriptionIntrospectionRootField.introspectionRootField=Validierungsfehler ({0}) : Subscription operation ''{1}'' root field ''{2}'' kann kein introspection field sein
65
-
SubscriptionIntrospectionRootField.introspectionRootFieldWithFragment=Validierungsfehler ({0}) : Subscription operation ''{1}'' fragment root field ''{2}'' kann kein introspection field sein
64
+
SubscriptionRootField.forbidSkipAndIncludeOnSubscriptionRoot=Validierungsfehler ({0}) : Subscription operation ''{1}'' root field ''{2}'' darf weder @skip noch @include directive in top level selection
65
+
#
66
66
#
67
67
UniqueArgumentNames.uniqueArgument=Validierungsfehler ({0}) : Es kann nur ein Argument namens ''{1}'' geben
Copy file name to clipboardExpand all lines: src/main/resources/i18n/Validation_nl.properties
-2Lines changed: 0 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -58,9 +58,7 @@ ScalarLeaves.subselectionOnLeaf=Validatiefout ({0}) : Sub-selectie niet toegesta
58
58
ScalarLeaves.subselectionRequired=Validatiefout ({0}) : Sub-selectie verplicht voor type ''{1}'' van veld ''{2}''
59
59
#
60
60
SubscriptionUniqueRootField.multipleRootFields=Validatiefout ({0}) : Subscription operation ''{1}'' moet exact één root field hebben
61
-
SubscriptionUniqueRootField.multipleRootFieldsWithFragment=Validatiefout ({0}) : Subscription operation ''{1}'' moet exact één root field met fragmenten hebben
62
61
SubscriptionIntrospectionRootField.introspectionRootField=Validatiefout ({0}) : Subscription operation ''{1}'' root field ''{2}'' kan geen introspectieveld zijn
63
-
SubscriptionIntrospectionRootField.introspectionRootFieldWithFragment=Validatiefout ({0}) : Subscription operation ''{1}'' fragment root field ''{2}'' kan geen introspectieveld zijn
64
62
#
65
63
UniqueArgumentNames.uniqueArgument=Validatiefout ({0}) : Er mag maar één argument met naam ''{1}'' bestaan
validationErrors.first().getMessage().contains("Subscription operation 'MySubscription' root field 'dog' must not use @skip nor @include directives in top level selection")
45
+
}
46
+
47
+
def"invalid subscription with @include directive on root field"() {
48
+
given:
49
+
def query ="""
50
+
subscription MySubscription {
51
+
dog @include(if: true) {
52
+
name
53
+
}
54
+
}
55
+
"""
56
+
57
+
when:
58
+
def validationErrors = validate(query)
59
+
60
+
then:
61
+
validationErrors.size() ==1
62
+
validationErrors.first().getMessage().contains("Subscription operation 'MySubscription' root field 'dog' must not use @skip nor @include directives in top level selection")
63
+
}
64
+
65
+
// dz todo investigate NPE with field collector on spreads at root level
66
+
def"invalid subscription with directive in fragment spread"() {
67
+
given:
68
+
def query ="""
69
+
subscription MySubscription {
70
+
...dogFragment @skip(if: false)
71
+
}
72
+
73
+
fragment dogFragment on Subscription {
74
+
dog {
75
+
name
76
+
}
77
+
}
78
+
"""
79
+
80
+
when:
81
+
def validationErrors = validate(query)
82
+
83
+
then:
84
+
validationErrors.size() ==1
85
+
validationErrors.first().getMessage() =="Subscription root field cannot have @skip directive."
86
+
}
87
+
88
+
// dz todo investigate NPE with field collector on spreads at root level
89
+
def"invalid subscription with directive in inline fragment"() {
90
+
given:
91
+
def query ="""
92
+
subscription MySubscription {
93
+
... on Subscription @include(if: true) {
94
+
dog {
95
+
name
96
+
}
97
+
}
98
+
}
99
+
"""
100
+
101
+
when:
102
+
def validationErrors = validate(query)
103
+
104
+
then:
105
+
validationErrors.size() ==1
106
+
validationErrors.first().getMessage() =="Subscription root fields cannot have @include directive."
107
+
}
108
+
109
+
def"@skip and @include directives are valid on query root fields"() {
110
+
given:
111
+
def query ="""
112
+
query MyQuery {
113
+
pet @skip(if: false) {
114
+
name
115
+
}
116
+
pet @include(if: true) {
117
+
name
118
+
}
119
+
}
120
+
"""
121
+
122
+
when:
123
+
def validationErrors = validate(query)
124
+
125
+
then:
126
+
validationErrors.size() ==0
127
+
}
128
+
129
+
def"@skip and @include directives are valid on mutation root fields"() {
0 commit comments