Commit graph

563 commits

Author SHA1 Message Date
Kai Ren
7e886e8fab
Update GraphQL Playground to 1.7.28 version (#1190, #1069)
- track GraphQL Playground new versions via @dependabot
- automate GraphQL Playground integration glue adapting for new versions
2023-09-13 17:10:49 +00:00
Kai Ren
f9d90277bf
Upgrade GraphiQL to 3.0.5 version (#1188, #1069)
- track GraphiQL new version via @dependabot
- automate GraphiQL integration glue adapting for new versions
- rework `example/warp_subscriptions`  to support subscriptions in new GraphiQL
2023-09-13 17:34:44 +02: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
Gero Gerke
b375146466
Update GraphiQL (#1069)
* Update GraphiQL Source

* pass through request headers from header box

---------

Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
2023-08-28 17:18:23 -04:00
Christian Legnitto
108ccf2715
Clippy fixes (#1181) 2023-08-25 22:48:01 +00:00
tyranron
b172d51b6e
Get rid of deprecated chrono functions in juniper tests 2023-07-10 13:41:28 +03:00
tyranron
f1ecde260c
Improve BigDecimal parsing from Float with ryu crate (#1176) 2023-07-10 13:31:32 +03:00
dependabot[bot]
d9dfae6d59
Upgrade bigdecimal crate 0.4 version (#1176)
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-07-07 14:56:49 +03:00
dependabot[bot]
dc86fcf820
Upgrade indexmap crate to 2.0 version (#1174)
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-07-07 09:47:53 +00:00
Chris
42ad693fcb
Make Clippy happy with is_ascii_* methods (#1159) 2023-04-04 12:11:10 +03:00
daviddanielarch-nextroll
91064e9554
Add LookAheadMethods::applies_for() method (#1145, #1138) 2023-03-01 18:11:57 +02:00
Kai Ren
7e5c8819c2
Support non-browser WASM (#1147, #1118)
- gate `js-sys` and `wasm-bindgen` behind `js` Cargo feature
2023-02-28 12:00:02 +02:00
tyranron
5d53001994
Release juniper 0.15.11 2023-01-31 12:31:44 +02:00
tyranron
14f4a31bb7
Fix string mangling on dynamic schema by upgrading smartstring crate (#1142, #1143) 2023-01-31 12:28:31 +02:00
tyranron
150227f357
Make Clippy happy for 1.67 Rust 2023-01-27 19:14:46 +02:00
tyranron
6aa6385437
Bump up MSRV to 1.65.0 2022-12-19 09:31:23 +01:00
tyranron
3a68877de0
Tune up for 1.65 Rust 2022-11-04 19:05:09 +01:00
dependabot[bot]
819e26aba1
Upgrade chrono-tz crate to 0.8 version (#1119)
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-11-02 18:33:08 +00: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
dependabot[bot]
3a2254b854
Upgrade chrono-tz crate to 0.7 version (#1114)
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-10-20 17:37:00 +00: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
tyranron
0df1e448e8
Tune up for 1.63 Rust 2022-08-12 17:03:06 +03:00
tyranron
faf1f57200
Merge juniper 0.15.10 backports 2022-07-28 17:21:12 +03:00
tyranron
6fd7a591cf
Release juniper 0.15.10 2022-07-28 17:12:27 +03:00
tyranron
8d28cdba6e
Backport CVE-2022-31173 fix from GHSA-4rx6-g5vg-5f3j
Co-authored-by: ilslv <ilya.solovyiov@gmail.com>
2022-07-28 17:07:55 +03:00
ilslv
c65bc07ff8 Fix codegen/fail assertions for latest nightly 2022-07-28 16:16:14 +03:00
ilslv
c843471d37 Fix NoUnusedFragments validation rule 2022-07-28 15:44:29 +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
tyranron
b32c54eeaa
Mention #113 in CHANGELOG 2022-07-26 11:42:44 +03:00
tyranron
c650713997
Backport accepting explicit null argument for nullable list input parameter (#1086, #1085) 2022-07-22 10:12:42 +02:00
ajawalker
98412a937e
Accept explicit null argument for nullable list input parameter (#1086, #1085) 2022-07-21 16:49:45 +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
50U10FCA7
76b9caf9fa
Fix building juniper crate without default features (#1064, #1065)
Co-authored-by: Kai Ren <tyranron@gmail.com>
2022-05-17 11:36:46 +03:00
Wojciech Niedźwiedź
bdaee42156
Provide integration for bigdecimal and rust_decimal crates (#1060, #1059)
Co-authored-by: Kai Ren <tyranron@gmail.com>
2022-05-05 21:00:58 +03: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
tyranron
30d80dff12
Fix codegen failure test for latest nightly Rust 2022-04-19 17:22:43 +03:00
tyranron
ba1ed85b3c
Relax object safety requirement for GraphQLValue and GraphQLValueAsync traits 2022-04-19 16:33:10 +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
ilslv
d0b56f9222
Implement #[derive(GraphQLInterface)] to use structs as GraphQL interfaces (#1026)
- support `#[graphql_interface]` on structs
2022-04-01 21:10:45 +03:00
ilslv
fec998dce8
Update chrono crate scalars according to graphql-scalars.dev (#1010)
- remove `scalar-naivetime` feature
- disable `chrono` feature by default
2022-03-04 17:53:27 +02:00
ilslv
5bbc73ad89
Redesign #[derive(ScalarValue)] macro to derive ScalarValue on enums (#1025) 2022-03-03 15:49:35 +02:00
dependabot[bot]
4862915e47
Upgrade smartstring crate to 1.0 version (#1030)
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-02-28 12:59:19 +02:00
ilslv
0ebd19af5a
Redesign #[derive(GraphQLScalar)] and #[graphql_scalar] macros (#1017)
- `#[derive(GraphQLScalar)]`:
    - support generic scalars
    - support structs with single named field
    - support for overriding resolvers
- `#[graphql_scalar]`:
    - support `transparent` argument

Co-authored-by: Kai Ren <tyranron@gmail.com>
2022-02-28 11:34:38 +02:00
ilslv
63198cdfcb
Redesign #[graphql_scalar] macro (#1014, #1000)
- support generic scalars
- make it applicable to type aliases and struct/enums/unions
2022-02-24 17:12:17 +02: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
tyranron
a0a566bc5b
Release juniper_codegen 0.15.9 2022-02-02 18:28:30 +02:00
tyranron
bb35c66448
Make validation execute in stages to avoid possible infinite recursion 2022-02-02 18:27:08 +02:00
Christian Legnitto
3025ab0a4a Release juniper 0.15.8 2022-01-26 23:28:49 -08:00
Christian Legnitto
1fd518e72c Release juniper_codegen 0.15.8 2022-01-26 23:28:15 -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
Christian Legnitto
c28c77e458 Fix panic on malformed queries with recursive fragments.
This is a potential denial-of-service attack vector. Thanks to
[@quapka](https://github.com/quapka) for the detailed vulnerability report
and reproduction steps.
2022-01-26 22:31:10 -08:00
Christian Legnitto
17d474ed21 Fix panic on malformed queries with recursive fragments.
This is a potential denial-of-service attack vector. Thanks to
[@quapka](https://github.com/quapka) for the detailed vulnerability report
and reproduction steps.
2022-01-26 20:24:27 -10: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
ilslv
eb83b60c9a
Support directives on variables definitions (#1005, #1000) 2021-12-21 19:14:34 +02:00
tyranron
18b10af9f3
Improve time crate integration (#1006)
- fix input/result coercions for `OffsetDateTime` according to spec
- use `@specifyByUrl` directive
- remove `time` from default features
2021-12-20 19:33:39 +01:00
ilslv
d9e209a19d
Add @deprecated directive (#1008) 2021-12-20 19:51:46 +02:00
ilslv
847d09fb5e
Support @specifiedBy(url: "...") directive via specified_by_url attribute argument in #[graphql_scalar] and #[derive(GraphQLScalarValue)] macros (#1003, #1000)
- support `isRepeatable` field on directives
- support `__Schema.description`, `__Type.specifiedByURL` and `__Directive.isRepeatable` fields in introspection
2021-12-20 13:36:27 +02:00
Scott Wilson
3e4d4ea76e
Support time crate types as GraphQL scalars (#1006)
Co-authored-by: Kai Ren <tyranron@gmail.com>
2021-12-16 22:43:15 +02:00
ilslv
265d4c5bb2
Fix list input coercion rules (#1004)
Additionally:
- fix WASM builds after 2.1 version of `bson`
2021-12-16 12:36:53 +02:00
Kai Ren
46be97ada4
Refactor FromInputValue to return Result instead of Option (#987)
- propagate `FromInputValue` conversion errors during validation
- replace panics with errors during resolving

Co-authored-by: ilslv <ilya.solovyiov@gmail.com>
2021-12-14 19:30:27 +02:00
ilslv
e264cf509d
Forbid __typename on subscription root (#1001, #1000) 2021-12-13 14:27:14 +02:00
dependabot[bot]
811c90486d
Upgrade graphql-parser to 0.4 version (#998)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ilya Solovyiov <ilya.solovyiov@gmail.com>
2021-11-30 10:50:09 +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
168114fcf0
Use async Mutex in juniper_actix to fix latest nightly errors 2021-10-11 19:24:30 +03:00
dependabot[bot]
a8759b0a30 Update pretty_assertions requirement from 0.7.1 to 1.0.0
Updates the requirements on [pretty_assertions](https://github.com/colin-kiegel/rust-pretty-assertions) to permit the latest version.
- [Release notes](https://github.com/colin-kiegel/rust-pretty-assertions/releases)
- [Changelog](https://github.com/colin-kiegel/rust-pretty-assertions/blob/main/CHANGELOG.md)
- [Commits](https://github.com/colin-kiegel/rust-pretty-assertions/compare/v0.7.1...v1.0.0)

---
updated-dependencies:
- dependency-name: pretty_assertions
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-28 16:15:35 -10:00
dependabot[bot]
7ba7585d75
Update chrono-tz requirement from 0.5 to 0.6 (#982)
Updates the requirements on [chrono-tz](https://github.com/chronotope/chrono-tz) to permit the latest version.
- [Release notes](https://github.com/chronotope/chrono-tz/releases)
- [Changelog](https://github.com/chronotope/chrono-tz/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono-tz/commits/v0.6.0)

---
updated-dependencies:
- dependency-name: chrono-tz
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-23 16:55:20 -07:00
nickelc
b9257ef7d4
Fix Clippy warnings (#980) 2021-09-12 20:38:41 +03:00
dependabot[bot]
6bb34b9b64
Upgrade 'bson' crate to 2.0 version (#932, #979)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kai Ren <tyranron@gmail.com>
Co-authored-by: Grant Perry <grant42perry@gmail.com>
2021-09-08 19:42:07 +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
tyranron
8a90f867d4
Expose GraphQLRequest fields (#750) 2021-07-21 20:45:01 +03:00
tyranron
5fbd751de2
Fix spelling in documentation for juniper::Object (#960) 2021-07-19 14:07:58 +03:00
Kai Ren
7597523720
Allow spreading interface fragments on unions and other interfaces (#965, #798) 2021-07-19 14:06:47 +03:00
Christian Legnitto
88b10fe009 Release juniper 0.15.7 2021-07-08 00:01:56 -07:00
Christian Legnitto
f50ef5dfaa Release juniper_codegen 0.15.7 2021-07-08 00:00:55 -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
Christian Legnitto
93deb2862a
Make juniper_rocket_async replace juniper_rocket (#955)
* Make juniper_rocket_async replace juniper_rocket

Now that rocket v0.5 is async and in rc, merge the two juniper projects.

Fixes https://github.com/graphql-rust/juniper/issues/947.

* Remove println
2021-07-07 09:26:22 -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
Idan Mintz
d4fda786ba
Fixes panic when spreading untyped union fragment. (#946)
* Fixes panic when spreading untyped union fragment.

closes #945

* Fix ci breakage with explicit lifetime annotation in juniper_rocket_async
2021-06-14 00:52:41 -07:00
Christian Legnitto
5dee177fb1 Release juniper 0.15.6 2021-06-07 18:23:16 -07:00
Christian Legnitto
3d57c8316d Release juniper_codegen 0.15.6 2021-06-07 18:22:09 -07:00
Sujay Jayakar
777b0d4349
Don't require () TypeInfo for schema language methods (#935)
* Don't require `()` TypeInfo for schema language methods

* Add PR to CHANGELOG.md

Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
2021-06-06 15:35:23 -07:00
tyranron
e998457c0e
Release juniper 0.15.5 2021-05-11 17:38:32 +03:00
tyranron
c3a04d7d22
Release juniper_codegen 0.15.5 2021-05-11 17:08:34 +03:00
xDarksome
35b6643bad
Fix internal representation of object fields (#872, #926) 2021-05-10 14:36:38 +03:00
tyranron
70bc9c4512
Make Clippy almost happy on latest Rust 2021-05-10 12:18:31 +03:00