tyranron
113b112daf
Impl codegen for scalars (resolve::Value
trait), vol.3
2022-05-31 19:08:36 +02:00
tyranron
22f3f1887e
Bikeshed reflection, vol.1
2022-05-31 00:31:28 +02:00
tyranron
b1be8f1d29
Improve codegen for scalars, vol.2
2022-05-30 19:09:15 +02:00
tyranron
b381c696ff
Improve and polish codegen for scalars
2022-05-27 18:11:40 +02:00
tyranron
8ea231f395
Building up codegen for scalars, vol.2
2022-05-19 17:32:43 +02:00
tyranron
21c7a3a653
Bootstrap codegen for scalars
2022-05-17 17:13:25 +02: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
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
tyranron
4182a8cf2b
Fix tests for 1.0.90 syn
version
2022-03-29 12:28:25 +03:00
ilslv
5bbc73ad89
Redesign #[derive(ScalarValue)]
macro to derive ScalarValue
on enums ( #1025 )
2022-03-03 15:49:35 +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
589acb5a7b
Merge security fixes from 0.15 juniper
releases
2022-02-02 19:37:24 +02:00
tyranron
a0a566bc5b
Release juniper_codegen
0.15.9
2022-02-02 18:28:30 +02:00
Christian Legnitto
1fd518e72c
Release juniper_codegen 0.15.8
2022-01-26 23:28:15 -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
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
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
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
nickelc
b9257ef7d4
Fix Clippy warnings ( #980 )
2021-09-12 20:38:41 +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
ad64025572
Strip redundant fields in codegen producing warnings
2021-07-21 18:16:29 +03:00
Christian Legnitto
f50ef5dfaa
Release juniper_codegen 0.15.7
2021-07-08 00:00:55 -07:00
Filip Gospodinov
de4c0e9088
juniper_codegen: macro hygiene for graphql_subscription ( #948 )
...
Fully qualify `std::result::Result` such that it doesn't
collide with locally defined type aliases for `Result`.
This improves macro hygiene.
2021-06-26 13:15:41 -10:00
Christian Legnitto
3d57c8316d
Release juniper_codegen 0.15.6
2021-06-07 18:22:09 -07:00
ihor-rud
d3896bd33c
Fix using graphql_scalar proc macro inside a macro ( #933 )
2021-06-06 15:05:53 -07:00
tyranron
c3a04d7d22
Release juniper_codegen 0.15.5
2021-05-11 17:08:34 +03:00
xDarksome
f04434416b
Fix subscription error extensions ( #927 )
2021-05-11 10:43:52 +03:00
tyranron
70bc9c4512
Make Clippy almost happy on latest Rust
2021-05-10 12:18:31 +03:00
Christian Legnitto
1815d23194
Release juniper_codegen 0.15.4
2021-04-03 15:35:33 -10:00
Christian Legnitto
fc1c7dfe63
Release juniper_codegen 0.15.3
2021-01-27 17:53:14 -10:00
Graeme Coupar
824cd4081b
Update juniper_codegen for syn 1.0.60 ( #861 )
...
* Update juniper_codegen for syn 1.0.60
syn 1.0.60 has updated it's `Type::__Nonexhaustive` to
`Type::TestExhaustive`, breaking juniper. This updates juniper to use
the recommended idiom for doing exhaustive matching on `Type`, which
fixes this.
Not entirely clear if we need exhaustive matching here or if we could
just use a fallback, but this fixes the build at least.
Also updated the minimum syn so users have to pull it in
* Update example to use relative deps
As otherwise CI fails on this branch
2021-01-26 07:41:03 -10:00
Christian Legnitto
948517b84f
Release juniper_codegen 0.15.2
2021-01-15 19:44:23 -10:00
Christian Legnitto
f1f64446b5
Release juniper_codegen 0.15.1
2020-12-12 09:47:47 -10:00
Christian Legnitto
6326acde33
Fix some clippy lints ( #809 )
2020-12-10 21:41:23 -10:00
Christian Legnitto
d63fdef321
Release juniper_codegen 0.15.0
2020-12-09 19:19:00 -10:00
Zak
4ffd276a5b
Allow raw identifier for field arguments in #[graphql_object] macro ( #812 , #786 )
2020-11-26 12:46:06 +02:00
Jonas Meurer
cb6d89f4c7
Allow different Scalar for GraphQLScalarValue ( #807 )
...
* allow setting scalar in macro
* rustfmt
* added changes to changelog
* added test cases
2020-11-15 17:15:55 -10:00
Kai Ren
3472fe6d10
Fix attributes naming on fields and arguments for interfaces and unions ( #806 )
...
Additionally:
- revive macros/tests/object
- revive executor_tests/interfaces_unions
2020-11-14 15:41:01 +02:00
tyranron
bcbf44ecbd
Make GraphQL interface value enum variants named after the type they contain
2020-11-09 14:07:33 +01:00
tyranron
4dbd740fef
Fix missing docs for enum variants generated for dispatching GraphQL interface values
2020-11-09 13:40:24 +01:00
Kai Ren
a4871887bb
Default to generic ScalarValue in #[graphql_object] macro ( #779 )
...
* Change codegen ScalarValue defaults for #[graphql_object] macro
* Fix integration tests
* Fix codegen failure tests
* Fix 'juniper' crate tests
* Fix integration crates tests
* Fix 'juniper_benchmarks' crate
* Fix examples
* Fix Book
* Fix
* Add CHANGELOG entry
* Some Book corrections
* Fix
* Bootstrap coercion machinery
* Reimpl coercion
* Correct tests, vol.1
* Correct tests, vol.2
* Correct tests, vol.3
* Correct tests, vol.4
* Correct tests, vol.5
* Fix coercion for subscriptions
* README fixes
Co-authored-by: Christian Legnitto <christian@legnitto.com>
Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
2020-11-06 18:15:18 -08:00
Chris
cd66bdb450
Add ability to distinguish between implicit and explicit null ( #795 )
...
* add Nullable to distinguish between implicit and explicit null
* cargo fmt
* add page to book
* address comment
2020-10-23 19:21:37 -04:00
Kai Ren
421b343398
Remove redundant extern crate
usages ( #790 )
...
Additionally:
- remove obsolete benches in benches/ dir
- restore benches in juniper/benches/ dir
2020-10-19 19:42:27 +03:00
nirmangupta
5832b3696d
Support chrono-tz::Tz GraphQL scalar ( #519 )
...
Co-authored-by: Nirman Gupta <nirmangupta@gmail.com>
Co-authored-by: Kai Ren <tyranron@gmail.com>
2020-10-19 15:30:17 +03:00