* Implement `std::error::Error` for all error types
* Fix copy-paste
* Implement `Display` for `Value`
This is required for implementing `Display` for `FieldError`
* Implement `std::error::Error` for `FieldError`
This required removing `impl From<T> for FieldError where T: Display`
because it would otherwise cause a conflicting implementation. That is
because `impl From<T> for T` already exists.
Instead I added `impl From<String> for FieldError` and `impl From<&str>
for FieldError` which should cover most use cases of the previous
`impl`. I also added `FieldError::from_error` so users can convert
from any error they may have.
* Bring back `impl<T: Display, S> From<T> for FieldError<S>`
We cannot have this and `impl<S> std::error::Error for FieldError<S>` so
we agreed this is more valuable. More context https://github.com/graphql-rust/juniper/pull/419
* Write errors without allocations
Fixes https://github.com/graphql-rust/juniper/issues/534.
I am not sure if the best way is to have folks bring their own futures for the
derives / macros or to pull it in as a dep explicitly like I have done here.
Because people are filing issues, we will do it this way and see what other issues arise.
there is still some weirdness going on. Running async and
non-async tests in `integration_tests/*` works, but running it
from `integration_tests` does not.
* Validate variables of the executed operation only
* Use `unreachable!` in `validate_var_defs`.
Use `unreachable!` instead of `panic!` on invalid variable types,
since thay have already been checked during document validation.
* Fix formatting in `validation/input_value.rs`