Commit graph

25 commits

Author SHA1 Message Date
Sebastian Goll
fb1531f90c
Add Jiff date/time types Zoned/TimeZone (#1278)
* Enable support for Jiff's Zoned type

* Enable support for Jiff's TimeZone type

* Remove unnecessary feature flag `jiff-tz`

* Avoid panic and allow offset-only time zones to be returned

* Add ZonedDateTime and TimeZone to integration test

* Split TimeZone into TimeZone and UTCOffset for Jiff integration

* Fix capitalization of `UtcOffset`

* Provide TimeZoneOrUtcOffset integration for jiff::tz::TimeZone

* Adjust documentation for newtypes and `TimeZoneOrUtcOffset`

* Use `jiff::tz::Offset` directly in `UtcOffset` newtype

* Remove unnecessary newtype for `UtcOffset` scalar

* Fix parsing of fixed offsets from `TimeZoneOrUtcOffset` scalar

* Add unrelated missing link to books page on scalars

* State necessity for newtype in scalars table in book

* Remove redundant `alloc` feature, is included in `std`

* Implement `Display` for TimeZone newtype

* Rename error enum variant to clarify meaning

* Use concise wording in description of TimeZone

Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>

* Revert extra notes column in scalar table

* Add link to documentation of newtype `TimeZone`

* Remove unused duplicate link reference

* Sort links and group links from the same crate together

---------

Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
2024-09-06 09:06:18 -07:00
Sebastian Goll
681d242823
Correct GraphQL scalars compliance for third-party crates even more (#1277)
- rename `ObjectId` scalar to `ObjectID` in `bson::oid::ObjectId` type
- add missing `@specifiedBy` URLs for `chrono` and `time` crates' types

Co-authored-by: Kai Ren <tyranron@gmail.com>
2024-08-16 02:17:30 +02:00
Kai Ren
b3a7ffc6a2
Correct GraphQL scalars compliance for third-party crates (#1275)
- switch `LocalDateTime` scalars to `yyyy-MM-ddTHH:mm:ss` format in `chrono::NaiveDateTime` and `time::PrimitiveDateTime` types
- switch from `Date` scalar to `LocalDate` scalar in `chrono::NaiveDate` and `time::Date` types
- switch from `UtcDateTime` scalar to `DateTime` scalar in `bson::DateTime` type
- correct `TimeZone` scalar in `chrono_tz::Tz` type
- rename `Url` scalar to `URL` in `url::Url` type
- rename `Uuid` scalar to `UUID` in `uuid::Uuid` type
2024-08-16 01:30:05 +02:00
Sebastian Goll
2756260000
Integrate jiff date/time types (#1271, #1270)
- represent `jiff::civil::Date` as `LocalDate` GraphQL scalar
- represent `jiff::civil::Time` as `LocalTime` GraphQL scalar
- represent `jiff::civil::DateTime` as `LocalDateTime` GraphQL scalar
- represent `jiff::Timestamp` as `DateTime` GraphQL scalar
- represent `jiff::Span` as `Duration` GraphQL scalar
2024-08-15 12:38:20 +02:00
tyranron
9c4ea327f9
Prepare 0.16.1 release of juniper crate 2024-04-04 16:00:47 +03:00
Hofer-Julian
c674548e64
Fix sentence in introduction (#1250)
Co-authored-by: Kai Ren <tyranron@gmail.com>
2024-04-04 11:50:35 +00:00
tyranron
9bb33525d4
Prepare 0.17.0 release of juniper_subscriptions crate (#1198) 2024-03-20 18:29:20 +02:00
tyranron
f0b63c4a63
Prepare 0.16.0 release of juniper crate (#1198) 2024-03-20 18:13:23 +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
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
Kai Ren
e64287cfc8
Sort order as "type-then-name" in generated schema's SDL (#1237, #1134)
- rename `RootNode::as_schema_language()` method as `RootNode::as_sdl()`
- rename `RootNode::as_parser_document()` method as `RootNode::as_document()`
- merge `graphql-parser` and `schema-language` Cargo features

Co-authored-by: Michael Groble <mike@groble.me>
2024-01-15 17:26:12 +01:00
Kai Ren
bd8dc582a4
Fix handling GET request in juniper_rocket example (#1223, #1098)
- rework `rocket_server` example as `simple`
- provide example in `GraphQLRequest` API docs
- mention GET query format in  `GraphQLRequest` API docs and `simple` example

Additionally:
- fix `operationName` query parameter handling
- make `graphiql_source()` and `playground_source()` polymorphic over `subscriptions_endpoint_url` argument
- provide examples in `graphiql_source()` and `playground_source()` API docs
- move integration HTTP tests to a separate file
- test both sync and async `juniper_rocket` in integration HTTP tests
- polish `FromForm` unit tests
2023-11-24 17:51:32 +00:00
Kai Ren
d7103e2ef2
Remove iron integration (#1210) 2023-11-09 23:52:24 -04:00
Kian-Meng Ang
0fc95ddbff
Integrate codespell for Book (#1121)
- add `codespell` CI job
- add `book.codespell` Makefile command
- fix Book typos found by codespell

Co-authored-by: Kai Ren <tyranron@gmail.com>
2023-10-27 15:51:41 +00:00
Kai Ren
9849736582
Improve WebSocket integration (#1191, #1022)
- consider `juniper_graphql_transport_ws` crate on CI
- implement auto-selection of protocol in `juniper_warp` crate
- support `graphql-transport-ws` protocol in  `juniper_actix` crate
- implement auto-selection of protocol in `juniper_actix` crate

Additionally:
- move `examples/warp_subscriptions` into `juniper_warp/examples/subscription.rs`
- move `examples/actix_subscriptions` into `juniper_actix/examples/subscription.rs`
- move `examples/basic_subscriptions` into `juniper_subscriptions/examples/basic.rs`
- bump up MSRV of `juniper_actix` crate to 1.68
2023-09-21 23:24:41 +02:00
Luke
3810666646
Fix link to actix-web example in Book (#1139) 2023-01-20 12:38:16 +00:00
tyranron
e3a72edf70
Fix mdBook tests on Windows (rust-lang/rust#99466) 2022-11-02 16:32:50 +01: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
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
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
9ca2364bfe
Allow interfaces to implement other interfaces (#1028, #1000) 2022-06-27 12:09:44 +00:00
dependabot[bot]
0d6d6471a2
Upgrade uuid crate to 1.0 version (#1057)
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>
2022-04-20 20:21:14 +03:00
dependabot[bot]
67cb649107
Upgrade iron to 0.6 version for Book tests (#1053)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-12 17:56:58 +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