Commit graph

239 commits

Author SHA1 Message Date
tyranron
48631e9b25
Impl reflect traits for enums 2022-06-27 15:14:05 +02:00
tyranron
505e25cea2
Temporary disable new reflection for fields as it requires all leaf types implement 2022-06-27 14:53:49 +02:00
tyranron
2e2d365d64
Merge branch master into rework-core-traits [skip ci] 2022-06-27 14:42:43 +02:00
ilslv
9ca2364bfe
Allow interfaces to implement other interfaces (, ) 2022-06-27 12:09:44 +00:00
ilslv
26d9daaadf
Rework #[derive(GraphQLEnum)] macro implementation () 2022-06-24 21:57:52 +03:00
tyranron
1819ab6e12
Impl reflect traits for objects and interfaces fields, vol.1 [skip ci] 2022-06-23 18:37:14 +02:00
tyranron
23e01956b3
Impl reflect traits for objects and interfaces [skip ci] 2022-06-23 17:42:55 +02:00
tyranron
42e2780142
Fix tests 2022-06-23 16:41:16 +02:00
tyranron
2d89de3403
Impl new machinery for Vec [skip ci] 2022-06-20 19:12:58 +02:00
tyranron
66c11ec782
Impl macro for scalars, vol.6 [skip ci] 2022-06-20 17:41:45 +02:00
tyranron
4d7770d226
Impl macro for scalars, vol.5 [skip ci] 2022-06-19 23:06:59 +02:00
tyranron
1aafd3da5d
Impl macro for scalars, vol.4 [skip ci] 2022-06-19 22:18:50 +02:00
tyranron
679c1c1162
Impl macro for scalars, vol.3 [skip ci] 2022-06-17 23:53:18 +02:00
tyranron
a05a0091f6
Impl macro for scalars, vol.2 [skip ci] 2022-06-17 21:30:30 +02:00
tyranron
f2718cc01a
Impl macro for scalars, vol.1 [skip ci] 2022-06-17 18:24:02 +02:00
tyranron
5a62ddfbf2
Restore old reflection impls 2022-06-08 11:06:28 +02:00
tyranron
8235ac22c0
Reworking base traits, vol.1 [skip ci] 2022-06-06 19:06:59 +02:00
tyranron
97d2da581a
Impl codegen for scalars (resolve::ToInputValue trait), vol.5 2022-06-01 17:31:02 +02:00
tyranron
740aa9061e
Impl codegen for scalars (resolve::ValueAsync trait), vol.4 2022-06-01 16:20:19 +02:00
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! (, ) 2022-04-13 16:15:50 +03:00
Kai Ren
72ed45a77c
Rework CI and project toolchain ()
- 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 ()
- 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 () 2022-03-03 15:49:35 +02:00
ilslv
0ebd19af5a
Redesign #[derive(GraphQLScalar)] and #[graphql_scalar] macros ()
- `#[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 (, )
- 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
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
ilslv
1aa1000c3b
Redesign #[graphql_interface] macro (, , )
- 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 (, )
- 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 ()
- 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 ()
- remove `Serialize` impl from `#[derive(GraphQLScalarValue)]` macro expansion
2021-10-11 21:53:04 +03:00
nickelc
b9257ef7d4
Fix Clippy warnings () 2021-09-12 20:38:41 +03:00
Kai Ren
a3fda7363d
Rework codegen for GraphQL objects and subscriptions (, )
- 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 () ()
* 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