@@ -29,19 +29,21 @@ def __init__(
29
29
):
30
30
assert not (
31
31
type_def and introspection
32
- ), "Can't provide introspection type definition at the same time"
32
+ ), "Cannot provide introspection type definition at the same time. "
33
33
if transport and fetch_schema_from_transport :
34
34
assert (
35
35
not schema
36
- ), "Can't fetch the schema from transport if is already provided"
36
+ ), "Cannot fetch the schema from transport if is already provided"
37
37
introspection = transport .execute (parse (introspection_query )).data
38
38
if introspection :
39
- assert not schema , "Can't provide introspection and schema at the same time"
39
+ assert (
40
+ not schema
41
+ ), "Cannot provide introspection and schema at the same time."
40
42
schema = build_client_schema (introspection )
41
43
elif type_def :
42
44
assert (
43
45
not schema
44
- ), "Can't provide Type definition and schema at the same time"
46
+ ), "Cannot provide type definition and schema at the same time. "
45
47
type_def_ast = parse (type_def )
46
48
schema = build_ast_schema (type_def_ast )
47
49
elif schema and not transport :
@@ -61,7 +63,7 @@ def __init__(
61
63
def validate (self , document ):
62
64
if not self .schema :
63
65
raise Exception (
64
- "Cannot validate locally the document, you need to pass a schema."
66
+ "Cannot validate the document locally , you need to pass a schema."
65
67
)
66
68
validation_errors = validate (self .schema , document )
67
69
if validation_errors :
0 commit comments