Commit graph

63 commits

Author SHA1 Message Date
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
Kai Ren
d11e351a49
Use actix-ws for juniper_actix subscriptions (#1197)
- fix panicking issues in `graphql-transport-ws` protocol implementation
- rework `graphql-ws` integration tests in `juniper::http`
- add `graphql-transport-ws` integration tests in `juniper::http`
2023-10-24 17:59:36 +00:00
Kai Ren
aaf28e962d
Merge juniper_graphql_transport_ws and juniper_graphql_ws crates (#1196, #1022) 2023-10-17 16:12:20 +02: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
Christian Legnitto
108ccf2715
Clippy fixes (#1181) 2023-08-25 22:48:01 +00:00
Chris
27430bf60c
add juniper_graphql_transport_ws crate for new subscription protocol (#1158)
Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
2023-08-25 01:02:32 +00:00
tyranron
6aa6385437
Bump up MSRV to 1.65.0 2022-12-19 09:31:23 +01:00
Kai Ren
f3df70693c
Improve CI (#1113)
- switch to `dtolnay/rust-toolchain` GitHub action
- restore release Git tag format and correct `cargo-release` integration
- enable MSRV check
- integrate `cargo-careful`
2022-10-21 16:07:17 +00:00
tyranron
0df1e448e8
Tune up for 1.63 Rust 2022-08-12 17:03:06 +03: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
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
tyranron
77d4c90b23
Bump up juniper and juniper_codegen version to 0.16.0-dev to disambiguate release automation on CI 2022-02-02 20:08:41 +02:00
tyranron
589acb5a7b
Merge security fixes from 0.15 juniper releases 2022-02-02 19:37:24 +02:00
tyranron
855137cde6
Release juniper 0.15.9 2022-02-02 18:33:41 +02:00
Christian Legnitto
bae27e8694 Release juniper_graphql_ws 0.2.6 2022-01-26 23:51:12 -08:00
Christian Legnitto
5fb222e66f Release juniper_subscriptions 0.15.6 2022-01-26 23:50:29 -08:00
Christian Legnitto
3025ab0a4a Release juniper 0.15.8 2022-01-26 23:28:49 -08:00
Christian Legnitto
4b0aabe9f6 More breaking changes with cargo-release 0.19.0 2022-01-26 23:21:46 -08:00
Christian Legnitto
399a79056a Update key for newer cargo-release 2022-01-26 22:47:29 -08:00
ilslv
1aa1000c3b
Redesign #[graphql_interface] macro (#1009, #1000, #814)
- remove support for `#[graphql_interface(dyn)]`
- describe all interface trait methods with type's fields or impl block instead of `#[graphql_interface]` attribute on `impl Trait`
- forbid default impls on non-skipped trait methods
- support additional nullable arguments on implementer
- support returning sub-type on implementer
2022-01-26 20:58:53 +02:00
Kai Ren
acde85a814
Implement graphql_input_value! and graphql_vars! macros (#996, #503)
- add `From` impls to `InputValue` mirroring `Value` impls to provide better support for `Option` handling
- support expressions in `graphql_value!` macro
- use `null` in addition to `None` to create `Value::Null` in `graphql_value!` macro to mirror `serde_json::json!`
- use macros for `InputValue` and `Variables` construction in tests

Co-authored-by: Ilya Solovyiov <ilya.solovyiov@gmail.com>
2021-11-26 18:53:56 +02:00
Kai Ren
f66296d618
Replace ScalarValue::Visitor with DeserializeOwned requirement (#985)
- remove `Serialize` impl from `#[derive(GraphQLScalarValue)]` macro expansion
2021-10-11 21:53:04 +03:00
tyranron
74afe4c04a
Use graphql_value!() macro in tests asap 2021-08-13 02:12:01 +03:00
Kai Ren
a3fda7363d
Rework codegen for GraphQL objects and subscriptions (#971, #421)
- preserve and reuse defined impl blocks in #[graphql_object] and #[graphql_subscription] macros expansion
- allow renaming `ScalarValue` type parameter in expanded code via `scalar = S: ScalarValue` syntax

Additionally:
- rename `rename` attribute's argument to `rename_all`
- support `rename_all` in #[graphql_interface] macro
2021-08-11 17:41:49 +03:00
Kai Ren
39d1e43420
Allow using Rust arrays as GraphQL lists (#918) (#966)
* Provide impls for arrays

* Remove redundant Default bound

* Recheck other places of mem::transmute usage

* Fix missing marker impls

* Extend GraphQL list validation with optional expected size

* Improve input object codegen

* Cover arrays with tests

* Add CHANGELOG entry

* Consider panic safety in FromInputValue implementation for array

* Tune up codegen failure tests
2021-07-23 14:51:47 -10:00
Christian Legnitto
d4a5ed4b0e Release juniper_graphql_ws 0.3.0 2021-07-08 00:10:57 -07:00
Christian Legnitto
ac2c2e19a1 Release juniper_subscriptions 0.16.0 2021-07-08 00:09:19 -07:00
Christian Legnitto
88b10fe009 Release juniper 0.15.7 2021-07-08 00:01:56 -07:00
Christian Legnitto
28c116411d
Switch releasing commands from a blocklist to an allowlist (#956)
* Switch releasing commands from a blocklist to an allowlist

This is much better as we can hardocde the crates to filter out in
one place, can selectively release certain crates easily,
and only have one command instead of the "-some" hack

* get rid of workaround no longer needed

* More makefiles
2021-07-07 23:47:16 -07:00
Jordão Rodrigues Oliveira Rosario
739cc3bfc2
Upgraded tokio, warp, hyper and actix (#912)
* Upgraded tokio, warp, hyper and actix

* Code formatting

* actix-web temporary version fix specification

* Error handling fix on juniper_rocket

Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
2021-06-28 20:22:45 -10:00
Christian Legnitto
831211911b Release juniper_graphql_ws 0.2.5 2021-06-07 19:41:31 -07:00
Christian Legnitto
da85f01115 Release juniper_subscriptions 0.15.5 2021-06-07 19:40:35 -07:00
Christian Legnitto
5dee177fb1 Release juniper 0.15.6 2021-06-07 18:23:16 -07:00
tyranron
e998457c0e
Release juniper 0.15.5 2021-05-11 17:38:32 +03:00
tyranron
70bc9c4512
Make Clippy almost happy on latest Rust 2021-05-10 12:18:31 +03:00
Christian Legnitto
a85315e5fb Release juniper_graphql_ws 0.2.4 2021-04-03 15:41:32 -10:00
Christian Legnitto
728b1b598d Release juniper_subscriptions 0.15.4 2021-04-03 15:40:30 -10:00
Christian Legnitto
97d8b70ea0 Release juniper 0.15.4 2021-04-03 15:36:50 -10:00
Christian Legnitto
ed3bb68329
Add min so newer cargo-release doesn't fail (#909) 2021-04-03 15:13:25 -10:00
Christian Legnitto
3638e1e65e Release juniper_graphql_ws 0.2.3 2021-01-27 20:35:52 -10:00
Christian Legnitto
5490d25ee2 Release juniper_subscriptions 0.15.3 2021-01-27 20:32:22 -10:00
Christian Legnitto
212f896e40 Release juniper 0.15.3 2021-01-27 17:54:00 -10:00
Christian Legnitto
d4c97fdc77 Release juniper_graphql_ws 0.2.2 2021-01-15 19:53:42 -10:00
Christian Legnitto
5056a3c58f Release juniper_subscriptions 0.15.2 2021-01-15 19:52:18 -10:00
Christian Legnitto
186186a603 Release juniper 0.15.2 2021-01-15 19:46:23 -10:00
Christian Legnitto
7da9f6fcd6 Release juniper_graphql_ws 0.2.1 2020-12-12 09:52:41 -10:00
Christian Legnitto
bd6c5c7525 Release juniper_subscriptions 0.15.1 2020-12-12 09:51:38 -10:00
Christian Legnitto
b2a3b097bd Release juniper 0.15.1 2020-12-12 09:48:31 -10:00
Christian Legnitto
fcfb530a91 Remove space so replacements work in CI for
release tests
2020-12-12 09:47:12 -10:00