Whole file

nikitastupin/clairvoyance

The author described this change as Fix wrong handling of unknown type. Add tests. It counts as a record because the check below fails on the code as it stood at 87b2d9d89 and passes on e9ac36e88, with nothing else changed between the two runs.

Fix saved2020-10-23
Sharing licenceApache-2.0 · LICENSE
Change size+2 0

What the code was meant to do, written into the code itself as a save note

Fix wrong handling of unknown type. Add tests

The change

113113 doc = f"query {{ {doc} }}"
114114 elif path[0] == self._schema["mutationType"]["name"]:
115115 doc = f"mutation {{ {doc} }}"
116+ else:
117+ raise Exception("Unknown operation type")
116118
117119 return doc
118120

The check that tells the two apart

failpass·tests/graphql_test.py::TestSchema::test_raise_exception_on_unknown_operation_type

Check file tests/graphql_test.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it87b2d9d89ca1f83b7356e1b9008ebe0cde6974c7
Broken version dated2020-10-23
Moduleclairvoyance.graphql
Units changedSchema
Fingerprint2f1d93b7d29c7e4a
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.