def get_unique_schema_id(schema):
    # type: (GraphQLSchema) -> str
    """Get a unique id given a GraphQLSchema"""
    assert isinstance(schema, GraphQLSchema), (
        "Must receive a GraphQLSchema as schema. Received {}"
    ).format(repr(schema))

    if schema not in _cached_schemas:
        _cached_schemas[schema] = sha1(str(schema).encode("utf-8")).hexdigest()
    return _cached_schemas[schema]
Get a unique id given a GraphQLSchema