Commit graph

615 commits

Author SHA1 Message Date
Peter Majchrak
3373935046 Add support for "dyn" trait object syntax (#385)
* Use "dyn" for TraitObjects

* Cleanup after adding "dyn" support

* Add entry to CHANGELOG.md
2019-06-27 08:44:30 -07:00
Christoph Herzog
97e1005178 Clean up ScalarValue transparent derive argument handling and documentation. 2019-06-25 18:55:45 +02:00
theduke
7e0e7beaa7 Allow scalars without #[repr(transparent)] 2019-06-25 18:55:45 +02:00
Christoph Herzog
3396074274 (codegen) Implement newtype derive for scalars.
This commit implements a newtype style custom derive
for scalars via `#[derive(GraphQLScalarValue)]`, which now
supports both deriving a base enum scalar type and newtypes.

For newtypes, the `#[graphql(transparent)]` attribute is
required.

This commit:
* implements the derive
* adds integration tests
* updates the book
2019-06-25 18:55:45 +02:00
Christoph Herzog
a84dbf710d (ci) Fix cargo path in check_release_automation task 2019-06-25 17:40:37 +02:00
Christoph Herzog
522a38b0b1 (ci) Specify CARGO_HOME env var to ensure conformity 2019-06-25 17:40:37 +02:00
Christian Legnitto
6f051f9fcd (ci) Fix CI builds
* Update cargo-make
* Quote path on windows
2019-06-25 17:40:37 +02:00
jekshmek
675f34bc46 Fix test_invalid_field juniper::http (#380) 2019-06-24 23:08:36 -07:00
Kai Ren
49f723a3dd Optimize .unwrap_or() and .expect() usages (#374) 2019-06-18 23:12:13 -04:00
Christian Legnitto
4d9ec64eae
Make .cargo/bin if it does not exist (#375) 2019-06-18 23:10:55 -04:00
Clayton Ray
c2f119690b fix(docs): correct warp example link in book (#367)
This fix adds the correct link for the Warp Server example.
2019-05-25 18:56:35 -07:00
Jean Mertz
3456786463 Implement Serialize/Deserialize for ID scalar
As per the unofficial Rust API guidelines:

https://rust-lang-nursery.github.io/api-guidelines/interoperability.html#data-structures-implement-serdes-serialize-deserialize-c-serde
2019-05-23 15:49:15 +02:00
Andrey Kutejko
5b9a0bd31b Split Query and Database types in example schema (#360) 2019-05-18 09:07:51 -07:00
Andrey Kutejko
c93911958a Improve contribution guide 2019-05-18 14:20:44 +02:00
Christoph Herzog
74522b015e (book) Update the graphql_scalar! example to be generic
This is now basically a requirement due to GraphQLObject derive
being generic.
2019-05-17 19:26:01 +02:00
Christian Legnitto
43fcc63c23
Update RELEASING.md 2019-05-16 19:22:20 -07:00
Christian Legnitto
4eea56351b Release juniper_warp 0.3.0 2019-05-16 19:14:16 -07:00
Christian Legnitto
81a2c2bd90 Release juniper_rocket 0.3.0 2019-05-16 19:11:10 -07:00
Christian Legnitto
bd2da308e3 Release juniper_iron 0.4.0 2019-05-16 19:09:12 -07:00
Christian Legnitto
d1b5c1bb4d Release juniper_hyper 0.3.0 2019-05-16 19:05:32 -07:00
Christian Legnitto
9c9e3da72d Release juniper 0.12.0 2019-05-16 19:03:21 -07:00
Christian Legnitto
8a047e8702 Release juniper_codegen 0.12.0 2019-05-16 19:01:52 -07:00
Christoph Herzog
50a5f2a258 (ci) Re-enable juniper_hyper testing on nightly. 2019-05-16 23:38:54 +02:00
theduke
d47aa990ba Remove GraphQLType impl for unit () type (#355)
This impl can cause weird runtime errors and serves
no real practical purpose.

Removing the impl is a breaking change but is the only
way to error out at runtime.
2019-05-16 07:22:13 -07:00
theduke
2aaf8dd729 Add CONTRIBUTING.md guide (#356) 2019-05-16 07:21:13 -07:00
Christoph Herzog
cff6036206 (book) Add ::object macro field and argument customization info 2019-05-16 14:08:19 +02:00
David Pedersen
2518eff0c9 Expose the operation name from juniper_rocket::GraphQLRequest (#353)
Measuring the runtime of queries will only tell if there are slow
queries. To find out which queries are slow you need the operation name.

Getting the operation name was previously not possible from a Rocket
request handler. This fixes that.
2019-05-15 07:26:40 -07:00
Christoph Herzog
166c6d00c5 (tooling) Update release config to bump doc_root. 2019-05-15 11:20:51 +02:00
Yusuke Sasaki
0ae2475bb8 add #[doc(html_root_url)] to all published crates 2019-05-15 11:20:51 +02:00
theduke
06eee4c1a7
Add current / master book links to README 2019-05-14 16:04:29 +02:00
theduke
61f288b54c
Merge pull request #333 from theduke/graphql-object-proc-macro
Graphql object proc macro
2019-05-14 08:46:56 +02:00
Christoph Herzog
29025e6cae
Rename impl_object to object. 2019-05-13 21:15:14 +02:00
Christoph Herzog
520cac29a0
(codegen) Allow #[deprecated] on field in impl_object 2019-05-13 12:37:22 +02:00
Christoph Herzog
db0d5952dd
Formatting 2019-05-13 12:35:14 +02:00
Christoph Herzog
ffe00b9fa3
Fix release tooling for juniper_codegen
Patch juniper_codegen dev dependency on juniper.
2019-05-12 21:31:15 +02:00
Christoph Herzog
552b4d01ac
(codegen) Fix test dependency version to be exact.
Needed for releasing automation.
2019-05-12 21:03:52 +02:00
Christoph Herzog
de12e0eba5
Formatting... 2019-05-12 10:49:46 +02:00
Christoph Herzog
3cc142bfbc
Bump minimum rust version to 1.34 2019-05-12 10:49:40 +02:00
Christoph Herzog
67b28c5e89
(codegen) Remove (extern crate self) declaration 2019-05-12 10:36:30 +02:00
Christoph Herzog
52d7af2b8e
Remove internal macros from export + improve macro doc system.
Remove the internal macros from re-export.
This was a mistake.
Also, import each item from juniper_codegen manually to enable
rustdoc integration.
2019-05-12 10:36:30 +02:00
Christoph Herzog
f72f808be3
(warp) impl_object refactor 2019-05-12 10:36:30 +02:00
Christoph Herzog
1b30e012ae
(iron) impl_object refactor 2019-05-12 10:36:30 +02:00
Christoph Herzog
693405afa5
(book) impl_object refactor 2019-05-12 10:36:30 +02:00
Christoph Herzog
bf50c3eb86
Integration tests: impl_object refactor 2019-05-12 10:36:30 +02:00
Christoph Herzog
a993c16b85
Deprecate graphql_object! and replace with impl_object
This commit deprecates the graphql_object macro and replaces
all of it's uses with the new impl_object proc macro.
(Except for the old macro tests).

This commit also adds new integration tests for impl_object.
2019-05-12 10:36:30 +02:00
Christoph Herzog
758f3f7d40
(codegen) Implement impl_object macro + unify code with object derive
This commit implements a new proc macro `impl_object` that replaces
the old graphql_object! macro.

The code shares a lot of similarities with the GraphQLObject
custom derive, so the code was unified to handle both
more generically.

Also, doc comment processing was standardized and improved.
2019-05-12 10:35:03 +02:00
Christian Legnitto
794568e463
Add release automation (#346)
See `RELEASING.md` for directions
2019-05-11 23:51:28 -07:00
Christian Legnitto
edd1b26d71
Fix CHANGELOG typos 2019-05-11 22:54:40 -07:00
Rogerio Moura
dbfcc762da Specify path to graphql_object module (#352) 2019-05-05 20:20:21 -07:00
Christian Legnitto
0f78417f44
Delete yarn.lock (#351)
Not needed now that we have switched to mdbook
2019-05-03 00:39:58 -07:00