DEV Community

Discussion on: Snapshot Testing in Python

Collapse
 
leahein profile image
Leah Einhorn

Ah, it would be the GraphQL schema object. The example provided assumes usage of graphene, so the following would be a simple example of the schema:

from graphene import ObjectType, String, Schema

class Query(ObjectType):

    hello = String()

    def resolve_hello(root, info, name):
        return f'Hello {name}!'

my_schema = Schema(query=Query)

You would then pass my_schema into the Client.

You can read more about graphene here.