Mocking response for GraphQL query resolver from ServiceObject to prevent API calls in the UnitTests
Mocking response for GraphQL query resolver from ServiceObject to prevent API calls in the UnitTests Question: Let’s assume that I have the following service object: class Foo(object): def bar(self): return [‘foo’, ‘bar’] And this is the schema: import Foo class Query(graphene.ObjectType): bar = graphene.List(lambda: graphene.String) def resolve_bar(self, info): return Foo().bar() I am trying to test …