Commit graph

7 commits

Author SHA1 Message Date
dependabot[bot]
782eccba47
Upgrade syn crate to 2.0 version ()
- replace `proc-macro-error` crate with simplified `common::diagnostic::pollyfill`
- migrate `juniper_codegen_tests` to stable Rust

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kai Ren <tyranron@gmail.com>
2023-11-01 19:00:05 +01:00
tyranron
17a02fa766
Correct fully qualified paths in generated code (, ) 2023-10-13 19:28:42 +03:00
Peter Holloway
801820a3b6
Use fully qualified paths in generated code ()
If user code has a type alias (or custom type) called `Result` or
`Option` etc, this would be used instead of the intended standard
library types causing surprising compile errors from generated code.

Using the fully qualified path allows the generated code to be isolated
from user types.

Includes two basic regression tests covering `Result` and `Send`.

Fixes 
2023-10-06 11:59:00 -07:00
tyranron
ef7a7e8229
Upgrade to 2021 Rust edition
- set 1.62 Rust as MSRV
- use new fmt syntax where possible
- refactor `.to_owned()`, `.to_string()` and `.into()` usage
- rename `IntoResolvable::into()` as `IntoResolvable::into_resolvable()` to disambiguate with `Into::into()`
- use `#[derive(Default)]` for enums where possible
- use `bool::then_some()` where possible
2022-07-13 15:20:10 +02:00
tyranron
576d6fb6dd
Finish refactoring juniper_codegen crate 2022-07-11 17:06:05 +02:00
ilslv
927e42201a
Rework #[derive(GraphQLInputObject)] macro implementation ()
Co-authored-by: Kai Ren <tyranron@gmail.com>
2022-06-28 11:27:28 +00:00
ilslv
26d9daaadf
Rework #[derive(GraphQLEnum)] macro implementation () 2022-06-24 21:57:52 +03:00