File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,35 @@ def test_builds_a_schema_with_an_interface():
170170 _test_schema (schema )
171171
172172
173+ def test_builds_a_schema_with_an_implicit_interface ():
174+ FriendlyType = GraphQLInterfaceType (
175+ name = 'Friendly' ,
176+ resolve_type = lambda : None ,
177+ fields = lambda : {
178+ 'bestFriend' : GraphQLField (FriendlyType , description = 'The best friend of this friendly thing.' )
179+ }
180+ )
181+
182+ DogType = GraphQLObjectType (
183+ name = 'DogType' ,
184+ interfaces = [FriendlyType ],
185+ fields = lambda : {
186+ 'bestFriend' : GraphQLField (DogType )
187+ }
188+ )
189+
190+ schema = GraphQLSchema (
191+ query = GraphQLObjectType (
192+ name = 'WithInterface' ,
193+ fields = {
194+ 'dog' : GraphQLField (DogType )
195+ }
196+ )
197+ )
198+
199+ _test_schema (schema )
200+
201+
173202def test_builds_a_schema_with_a_union ():
174203 DogType = GraphQLObjectType (
175204 name = 'Dog' ,
You can’t perform that action at this time.
0 commit comments