Commit graph

679 commits

Author SHA1 Message Date
Kevin Stenerson
f2d228b8ae Add helpers to build custom GraphQLResponse (#158) 2018-05-29 23:28:36 -07:00
Christian Legnitto
7933bf92a5
Rename variable to be more descriptive. 2018-05-23 00:49:23 -07:00
piperRyan
9080448da2 Add Compile Time Check For "Invalid" Names (#170) 2018-05-23 00:25:20 -07:00
Paul Colomiets
69db4c247b Deserialize large integers as InputValue::float (fixes #178) 2018-05-23 00:21:57 -07:00
Georg Semmler
34391855af Fix imports 2018-05-20 15:55:34 +02:00
Georg Semmler
19e76865c9 Remove unused type_name field to fix tests 2018-05-20 15:55:34 +02:00
Georg Semmler
cfc3109109 Rename childs to children 2018-05-20 15:55:34 +02:00
Georg Semmler
da9c21ccfe Add some documentation to the lookahead feature 2018-05-20 15:55:34 +02:00
Georg Semmler
61c07b95fc Small improvements + rustfmt 2018-05-20 15:55:34 +02:00
Georg Semmler
dd99914fbe Add a basic lookahead functionality 2018-05-20 15:55:34 +02:00
theduke
61f0c7d337
Update uuid version range
Allow 0.5 and 0.6
2018-05-10 06:43:28 +02:00
Christoph Herzog
9313c7ca6d Run rust fmt. 2018-05-03 07:38:10 +02:00
Marcus Griep
b94ed37c1f Remove unnecessary format!()
The `E::custom()` function requires a value of any type that implements
`fmt::Display`, so a plain `&str` works just fine here.
2018-05-03 07:27:15 +02:00
Marcus Griep
d1cddfb55f Revert lossy conversions to use as
The conversions in this changeset cannot use the `From<T>` trait
implementation because the conversion is lossy, either because they
involve converting a signed value to an unsigned value (`i32`⇒`u64`)
or because the convert from a larger data type to a smaller one
(`u64`⇒`i32`). In this case, the `as` type cast is necessary to perform
a bitwise conversion.

This coercion can cause negative values to become very large unsigned
values. This is intentional on line 90.
2018-05-03 07:27:15 +02:00
Marcus Griep
73a4efe984 Change $outname from :tt to :expr
It doesn't appear that `:tt` accepts the `stringify!()`-ed value in this
position. The :tt is only later used as an `:expr` to produce the name
for metadata purposes.

Converting this position to be an `:expr` allows the `stringify!()`-ed
value and accepts all current uses of the `graphql_scalar!()` macro in
this repository.
2018-05-03 07:27:15 +02:00
Atul Bhosale
875c80748d Fix cargo clippy warnings 2018-05-03 07:27:15 +02:00
Atul Bhosale
ea3c425f04 Replace try! with ? 2018-05-03 07:27:15 +02:00
Christoph Herzog
05c1011d83 (juniper_codegen) Upgrade syn + quote 2018-05-03 01:49:36 +02:00
Christoph Herzog
3df18f41f8 (juniper_rocket) Bump minimum rocket version to 0.3.9
Needed to bump minimum version to allow working on latest nightly.
2018-05-03 01:19:52 +02:00
theduke
3b445f0577
Add link to actix-web example 2018-04-29 14:58:38 +02:00
Christian Legnitto
218654ee97 Switch to indexmap 1.0
`ordermap` changed names to `indexmap` and released a stable 1.0.
2018-04-22 07:49:05 +02:00
Christian Legnitto
254a61c0e0 Update changelog for NaiveDate serialization change (#160) 2018-03-29 05:57:28 +02:00
Georg Semmler
2ea7d9b46e Allow graphiql to pass credentials to the server (#162) 2018-03-29 05:02:46 +02:00
Sebastian Porto
841fd7e26d Change serialization of Chronos NaiveDate (#151)
Fix chrono DateTime support

The DateTime support was improperly implemented with time (hour + minute support), which is fixed by this commit.

Documentation and tests have also been updated.

Only author: @sporto
2018-03-21 17:52:22 +01:00
Carlos Diaz-Padron
63d8a3d1a0 Handle list merging 2018-03-05 12:02:22 +01:00
Carlos Diaz-Padron
509a6f12b9 Fix merging parallel inline fragments 2018-03-05 12:02:22 +01:00
Christian Legnitto
28763a5639 Fix warning in iron_juniper
The warning was:

```
warning: unnecessary parentheses around function argument
   --> juniper_iron/src/lib.rs:268:43
    |
268 |             _ => return Ok(Response::with((status::MethodNotAllowed))),
    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these parentheses
    |
    = note: #[warn(unused_parens)] on by default
```
2018-02-21 15:07:37 +01:00
Christian Legnitto
0cc11a0dbe Make tests compile on latest nightly
Without this change tests were failing to compile:

```
---- src/value.rs - graphql_value (line 196) stdout ----
    error[E0468]: an `extern crate` loading macros must be at the crate root
 --> src/value.rs:197:14
  |
3 | #[macro_use] extern crate juniper;
  |              ^^^^^^^^^^^^^^^^^^^^^

thread 'rustc' panicked at 'couldn't compile the test', librustdoc/test.rs:295:13
note: Run with `RUST_BACKTRACE=1` for a backtrace.
```

I also confirmed that `main` does not show up in the docs with
this change.
2018-02-21 09:40:42 +01:00
Christoph Herzog
47575ef922 Prepare juniper_iron 0.1.2 release 2018-02-10 13:59:04 +01:00
Matrix
d9677b38df (iron) Update to iron 0.6
* Allow both iron 0.5 and 0.6
* Allow both urlencoded 0.5 and 0.6
2018-02-08 22:56:19 +01:00
Sackery
10538eca8b Change pretty json string to compact json string 2018-02-08 21:05:00 +01:00
Ivan Dubrov
bfe2ef511a Provide type info to the concrete_type_name 2018-01-20 10:53:18 +01:00
Christoph Herzog
d00e74bb4e Format entire codebase with rustfmt 2018-01-13 12:25:55 +01:00
Christoph Herzog
406bdaa55c Update embedded graphiql + move graphiql to http module
* Update graphiql to 0.11 and react to v16.
* Move graphiql to be a submodule of http
2018-01-13 11:44:36 +01:00
Christoph Herzog
5c976ba60d (ci) Update Rust versions built on travis
Since Rust 1.23 was released, only build 1.22 and 1.21 now.
2018-01-13 10:43:21 +01:00
Christoph Herzog
40c946c81c 0.9.2 release
* Changelogs
* Update versions and dependency versions
2018-01-13 10:34:30 +01:00
Christoph Herzog
5670fc7eb1 add decode query params to 0.1.2 changelog. 2018-01-13 10:02:43 +01:00
Christian Legnitto
9362d6954c url_decode parameters in Rocket integration
Also as part of this change I fixed and enabled
the http integration tests for Rocket.

Fixes https://github.com/graphql-rust/juniper/issues/116.
2018-01-13 08:50:13 +00:00
Christoph Herzog
883dd0b2ee juniper_rocket 0.1.2 release
* Bump version
* fix up changelog
2018-01-13 09:42:01 +01:00
sagie gur ari
23cf596748 windows build 2018-01-13 08:36:08 +00:00
Christian Legnitto
5b439f3fc1 Add a master changelog
This makes it so people using git dependencies know what has changed. It also
gives a spot to make a running changelog so when we do a release we can just
copy and paste.
2018-01-13 08:22:23 +00:00
Josh Marlow
b1543f480a Fixed case where .unwrap was being called instead of the Option just being propagated up the call chain 2018-01-13 08:20:51 +00:00
Christian Legnitto
ff01738a60 Update rocket in juniper_rocket to work with latest nightlies
`juniper_rocket` now requires nightly >= 2018-01-12. See
https://github.com/SergioBenitez/Rocket/issues/513#issuecomment-357407524.

Fixes https://github.com/graphql-rust/juniper/issues/125.
2018-01-13 07:50:33 +00:00
Christian Legnitto
d34b6a85ad Fix some warnings 2018-01-13 07:48:39 +00:00
theduke
0c15c99223
Fix test schema link in README 2017-12-26 08:03:40 +01:00
Christian Legnitto
5c3fb8e913 Update Rocket to latest version
Rocket requires nightly, but on nightly 2017-12-13 and after
the version of Rocket juniper's integration was using wouldn't
build. This is solved by updating Rocket to `0.3.4` which
according to the [changelog](https://github.com/SergioBenitez/Rocket/blob/v0.3.4/CHANGELOG.md#version-034-dec-14-2017):

"Codegen was updated for 2017-12-13 nightly."
2017-12-22 09:06:34 +01:00
Christian Legnitto
203af1ce98 Support __typename for unions
See http://graphql.org/learn/queries/#meta-fields.

Fixes https://github.com/graphql-rust/juniper/issues/112.
2017-12-06 11:26:31 +01:00
theduke
ca9d5c1c1a Bump to 0.9.1 and fix up Cargo.toml files 2017-12-03 18:48:38 +01:00
theduke
0f916f4aa6 Remove ResultExt and jtry! macro 2017-12-03 18:33:35 +01:00
theduke
eb70d29e04 Fix readme link in juniper crate 2017-12-03 17:17:41 +01:00