Commit graph

45 commits

Author SHA1 Message Date
Kai Ren
ec0d7d8097
Rework Book (#1230)
- rework and update existing chapters
- mention correct case transformation for GraphQL enums (#1029)
- document N+1 mitigation techniques and look-ahead features (#234, #444)
- mention all integration crates (#867)
- fix Book links (#679, #974, #1056)
- remove old version of Book (#1168)

Additionally:
- disable `bson`, `url`, `uuid` and `schema-language` Cargo features by default in `juniper` crate

Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
2024-03-20 15:53:25 +01:00
tyranron
ac6e60987f
Fix codegen failure tests for 1.76.0 Rust 2024-02-09 17:23:01 +02:00
Kai Ren
f363b0d79e
Preserve input body when attribute macro expansion fails (#1245, #1244) 2024-01-30 16:41:11 +01:00
Audun Halland
c54137f7b4
Rework look-ahead machinery as lazy-evaluated (#1212)
- make `LookAheadValue::List` to contain new iterable `LookAheadList` type
- make `LookAheadValue::Object` to contain new iterable `LookAheadObject` type
- remove `LookAheadMethods` trait and redundant `ConcreteLookAheadSelection` struct making all APIs accessible as inherent methods on `LookAheadSelection` and `LookAheadChildren` decoupled types
- move `LookAheadMethods::child_names()` to `LookAheadChildren::names()`
- move `LookAheadMethods::has_children()` to `LookAheadChildren::is_empty()`
- move `LookAheadMethods::select_child()` to `LookAheadChildren::select()`
- move `LookAheadSelection::for_explicit_type()` to `LookAheadSelection::children_for_explicit_type()`
- make `LookAheadSelection::arguments()` returning iterator over `LookAheadArgument`
- make `LookAheadSelection::children()` returning `LookAheadChildren`

Co-authored-by: Kai Ren <tyranron@gmail.com>
2024-01-16 19:17:07 +00:00
tyranron
57e6c9813c
Fix codegen tests for 1.75.0 Rust 2024-01-02 16:03:49 +01:00
Zak
ace693585d
Improve validation errors for input values (#811, #693)
Co-authored-by: Kai Ren <tyranron@gmail.com>
2023-11-30 20:51:08 +00:00
Kai Ren
f98bdf1a50
Allow disabling introspection (#1227, #456)
- implement `validation::rules::disable_introspection`
- add `RootNode::disable_introspection()` and `RootNode::enable_introspection()` methods
2023-11-28 16:49:26 +01:00
tyranron
3645df27b6
Stop Clippy from enforcing # Errors and # Panics sections in GraphQL descriptions 2023-11-17 21:38:17 +01:00
tyranron
a515d4b8b9
Fix codegen tests for 1.74 Rust 2023-11-16 21:14:50 +01:00
Kai Ren
316b1887b2
Provide anyhow crate integration (#1215, #988)
- implement `IntoFieldError` for `anyhow::Error`
- add `anyhow` and `backtrace` Cargo features
2023-11-15 19:29:59 +01:00
dependabot[bot]
2215cd0e0b
Upgrade itertools crate from 0.11 to 0.12 version (#1214)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-15 14:38:04 +00:00
dependabot[bot]
782eccba47
Upgrade syn crate to 2.0 version (#1157)
- 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
828d059b1b
Fix codegen tests for latest nightly 2023-10-24 18:23:04 +03:00
tyranron
57628de864
Check std::prelude hygiene in codegen tests (#1195, #1194) 2023-10-13 21:01:43 +03:00
Peter Holloway
801820a3b6
Use fully qualified paths in generated code (#1195)
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 #1194
2023-10-06 11:59:00 -07:00
tyranron
279bbedc3c
Fix CI pipeline
- fix codegen tests for latest nightly
- switch workspace default to `resolver = "2"`
- fix `juniper` tests for latest `chrono` version
2023-09-09 15:37:50 +03:00
tyranron
20c76a6342
Fix codegen tests for latest nightly 2023-09-07 12:42:10 +03:00
Christian Legnitto
421c8c9d58
Fix codegen tests for latest nightly (#1182) 2023-08-27 14:38:40 +00:00
Christian Legnitto
108ccf2715
Clippy fixes (#1181) 2023-08-25 22:48:01 +00:00
tyranron
a297b9b67e
Fix codegen tests for latest nightly 2023-07-10 14:13:05 +03:00
dependabot[bot]
74710d8a59
Upgrade itertools crate to 0.11 version (#1173)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-23 22:09:36 +02:00
tyranron
aff49ae5ec
Fix codegen tests for latest nightly 2023-06-23 14:28:12 +02:00
tyranron
b84621c3b3
Fix codegen tests for latest nightly Rust 2023-02-27 20:33:01 +02:00
tyranron
e569476bcc
Consider also testing spreading interface fragment on interface (#922) 2023-02-27 18:10:51 +02:00
tyranron
9ae0c89537
Fix codegen tests for latest nightly Rust 2023-01-20 15:32:07 +02:00
tyranron
dbe1b181db
Fix codegen tests for latest nightly Rust 2022-12-18 12:52:46 +01:00
tyranron
b8a23a1982
Fix codegen tests for latest nightly Rust 2022-10-17 14:24:12 +03:00
Lucas Betschart
4b89d61f21
Remove indirect time 0.1 dependency of chrono crate (#1099) 2022-08-29 20:16:49 +03:00
tyranron
e9482c3f18
Fix codegen tests for latest nightly Rust 2022-08-29 17:10:40 +03:00
ilslv
c65bc07ff8 Fix codegen/fail assertions for latest nightly 2022-07-28 16:16:14 +03:00
ilslv
2b609ee057
Merge pull request from GHSA-4rx6-g5vg-5f3j
* Replace recursions with heap allocations

* Some corrections [skip ci]

* Add recursive nested fragments test case

* Docs and small corrections

* Corrections

Co-authored-by: Kai Ren <tyranron@gmail.com>
2022-07-28 14:33:16 +03:00
Benno Tielen
bea94398e8
Improve project toolchain (#1084)
- switch from `skeptic` to mdBook native tests
- refactor `juniper_integration_tests` to be granular
- make `cargo test` command fully compatible with stable Rust
- adjust outdated Contribution Guide

Additionally:
- fix codegen tests on latest nightly Rust
2022-07-20 10:37:58 +00: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
ilslv
0c8bcf582f
Fix input value coercion with defaults (#1080, #1073) 2022-07-08 21:55:51 +00:00
Benno Tielen
5332db0a4b
Strip lifetime parameter from ParseError (#1081, #528)
- replace `Token` with its string representation in `ParseError`
- strip lifetime parameter from `GraphQLError`, `GraphQLResponse` and `GraphQLBatchResponse`

Co-authored-by: Kai Ren <tyranron@gmail.com>
2022-07-08 18:21:23 +00:00
tyranron
eb974fe3ac
Make happy latest stable and nightly Rust/Clippy 2022-07-08 16:10:07 +02:00
ilslv
a32140cd46
Update all links to October 2021 spec (#1075, #1000)
Co-authored-by: Kai Ren <tyranron@gmail.com>
2022-06-28 15:32:08 +00:00
ilslv
927e42201a
Rework #[derive(GraphQLInputObject)] macro implementation (#1052)
Co-authored-by: Kai Ren <tyranron@gmail.com>
2022-06-28 11:27:28 +00:00
ilslv
9ca2364bfe
Allow interfaces to implement other interfaces (#1028, #1000) 2022-06-27 12:09:44 +00:00
ilslv
26d9daaadf
Rework #[derive(GraphQLEnum)] macro implementation (#1047) 2022-06-24 21:57:52 +03:00
tyranron
d6f5cee8b3
Satisfy rust_2018_idioms rustc lint in generated code 2022-05-12 14:33:03 +03:00
tyranron
6b3898b077
Add docs for enum generated by #[graphql_interface] and #[derive(GraphQLInterface)] macros 2022-05-11 20:35:17 +03:00
tyranron
30d80dff12
Fix codegen failure test for latest nightly Rust 2022-04-19 17:22:43 +03:00
Cerber-Ursi
c40d80f26b
Fix expansion of procedural macros inside macro_rules! (#1054, #1051) 2022-04-13 16:15:50 +03:00
Kai Ren
72ed45a77c
Rework CI and project toolchain (#1043)
- remove `cargo-make` integration
- rework CI pipeline more granular and precise
- rework releasing process
- tune up project layout
- fill up new CHANGELOGs

Additionally:
- fix latest nightly/stable Rust inconsistencies
2022-04-08 17:44:50 +03:00