@@ -1288,7 +1288,7 @@ def test_accepts_an_object_which_implements_an_interface_along_with_more_fields(
1288
1288
1289
1289
assert schema_with_field_type (AnotherObject )
1290
1290
1291
- def test_rejects_an_object_which_implements_an_interface_field_along_with_more_arguments (self ):
1291
+ def test_accepts_an_object_which_implements_an_interface_field_along_with_more_arguments (self ):
1292
1292
AnotherInterface = GraphQLInterfaceType (
1293
1293
name = 'AnotherInterface' ,
1294
1294
resolve_type = _none ,
@@ -1316,11 +1316,41 @@ def test_rejects_an_object_which_implements_an_interface_field_along_with_more_a
1316
1316
}
1317
1317
)
1318
1318
1319
+ assert schema_with_field_type (AnotherObject )
1320
+
1321
+ def test_rejects_an_object_which_implements_an_interface_field_along_with_additional_required_arguments (self ):
1322
+ AnotherInterface = GraphQLInterfaceType (
1323
+ name = 'AnotherInterface' ,
1324
+ resolve_type = _none ,
1325
+ fields = {
1326
+ 'field' : GraphQLField (
1327
+ type = GraphQLString ,
1328
+ args = {
1329
+ 'input' : GraphQLArgument (GraphQLString )
1330
+ }
1331
+ )
1332
+ }
1333
+ )
1334
+
1335
+ AnotherObject = GraphQLObjectType (
1336
+ name = 'AnotherObject' ,
1337
+ interfaces = [AnotherInterface ],
1338
+ fields = {
1339
+ 'field' : GraphQLField (
1340
+ type = GraphQLString ,
1341
+ args = {
1342
+ 'input' : GraphQLArgument (GraphQLString ),
1343
+ 'anotherInput' : GraphQLArgument (GraphQLNonNull (GraphQLString )),
1344
+ }
1345
+ ),
1346
+ }
1347
+ )
1348
+
1319
1349
with raises (AssertionError ) as excinfo :
1320
1350
schema_with_field_type (AnotherObject )
1321
1351
1322
- assert str (excinfo .value ) == 'AnotherInterface .field does not define argument "anotherInput " but ' \
1323
- 'AnotherObject.field provides it .'
1352
+ assert str (excinfo .value ) == 'AnotherObject .field(anotherInput:) is of required type "String! " but ' \
1353
+ 'is not also provided by the interface AnotherInterface.field .'
1324
1354
1325
1355
def test_rejects_an_object_missing_an_interface_field (self ):
1326
1356
AnotherInterface = GraphQLInterfaceType (
0 commit comments