@@ -1288,7 +1288,7 @@ def test_accepts_an_object_which_implements_an_interface_along_with_more_fields(
12881288
12891289 assert schema_with_field_type (AnotherObject )
12901290
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 ):
12921292 AnotherInterface = GraphQLInterfaceType (
12931293 name = 'AnotherInterface' ,
12941294 resolve_type = _none ,
@@ -1316,11 +1316,41 @@ def test_rejects_an_object_which_implements_an_interface_field_along_with_more_a
13161316 }
13171317 )
13181318
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+
13191349 with raises (AssertionError ) as excinfo :
13201350 schema_with_field_type (AnotherObject )
13211351
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 .'
13241354
13251355 def test_rejects_an_object_missing_an_interface_field (self ):
13261356 AnotherInterface = GraphQLInterfaceType (
0 commit comments