mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 09:51:59 +03:00
c7d9baaf66
When trying to reduce the number of dependencies we use in the engine, I was blocked by a few `.clone()` calls that, on inspection, turned out to be completely unnecessary. I have replaced those with passing by reference, and then gone on a pedant spree. I enabled the `needless_pass_by_value` Clippy warning and fixed it everywhere that it highlighted. In most places, this meant adding `&`, but I also marked some types as `Copy`, which makes pass-by-value the right move. In one place, I replaced calls to `async_map` with `if` and `else`, to avoid constructing closures that capture across async boundaries. This means I could just delete `async_map`. V3_GIT_ORIGIN_REV_ID: 6ff71f0c553b707889d89552eff3e8c001e898cc |
||
---|---|---|
.. | ||
query_testdata | ||
schema_testdata | ||
testdata | ||
LICENSE-MIT | ||
parser_test.rs | ||
README.md |
testdata
contains snapshot/golden test inputs and expectations for SDL parsingquery_testdata
andschema_data
were later added, but for executable documents and SDL respectively. Theses cases were copied from the apollo-rs project at 721e0753 and the license atlang-graphql/tests/LICENSE-MIT
applies to these. Cases added subsequently are licensed under this project's top-level license.- some cases from the apollo lexer tests are copied with a 9xxx prefix
schema_data
cases are currently unused (TODO if SDL parsing is important)
A few full parse()
cases were also added from
graphql-js tests
although they were not numerous or very interesting. They are added starting at ok/1111_*
Test cases from fuzzing are added into the err/6xxx_
namespace. In these
cases a test failure is a panic.
Some ok
cases that are only valid for the 2021 spec were renamed to *.2021
and ignored.
TODO
- the
ok
case output mostly has not been audited - We might port the old
testdata
cases to the framework taken from apollo since it is nicer.