Commit graph

55 commits

Author SHA1 Message Date
tyranron
dc19d85fae
Tune lints for 1.83 Rust 2024-11-29 15:26:08 +01:00
tyranron
fb96fb1dd1
Update codegen tests for 1.81 Rust 2024-09-09 15:50:37 +03:00
dependabot[bot]
6b82d1d80e
Upgrade derive_more crate from 0.99.8 to 1.0 version (#1272)
- bump up MSRV to 1.75

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>
2024-08-12 23:31:39 +02:00
dependabot[bot]
a4974e179b
Update GraphiQL from 3.3.1 to 3.3.2 version (#1265)
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>
2024-07-04 13:49:28 +02:00
tyranron
3571fd995f
Fix codegen failure tests 2024-06-19 13:56:22 +02:00
dependabot[bot]
3b4a187d61
Update itertools crate from 0.12 to 0.13 version (#1259)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-20 12:17:16 +02:00
tyranron
02e931b516
Fix codegen failure tests 2024-05-09 11:20:14 +02:00
tyranron
2682ee1418
Make Clippy happy for 1.78 Rust 2024-05-02 18:03:27 +02:00
tyranron
6d65dffd28
Fix codegen failure tests for 1.77.0 Rust 2024-03-22 17:59:31 +02:00
tyranron
aea0ef2549
Make Clippy happy for 1.77 Rust 2024-03-22 17:59:16 +02:00
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