Commit graph

1082 commits

Author SHA1 Message Date
Andy Swan
ab498f2f24
fixing a double spell 2020-01-28 11:07:25 +00:00
Christian Legnitto
c984457e91 Fix scalar and some tests under async
there is still some weirdness going on. Running async and
non-async tests in `integration_tests/*` works, but running it
from `integration_tests` does not.
2020-01-27 23:41:38 -05:00
Christian Legnitto
c42c71b02d Update to latest tokio 2020-01-22 07:56:03 -08:00
Christian Legnitto
d22fab76c8 Fix clippy lints in warp 2020-01-22 07:56:03 -08:00
Christian Legnitto
15d7f4d076
Remove Travis badge from README 2020-01-21 10:11:10 -08:00
Christian Legnitto
824f329b0f Remove TravisCI 2020-01-21 09:41:46 -08:00
Christian Legnitto
036b72796a Only run async tests on master for crates that require master 2020-01-21 09:22:14 -08:00
Christian Legnitto
a54a6e9621 Turn off juniper_warp until it is fixed 2020-01-21 09:04:27 -08:00
Christian Legnitto
31ca3e6156 Add async to doc tests 2020-01-21 08:38:13 -08:00
Christian Legnitto
b8b28ec2bb Add empty changelog to make release dry-run work 2020-01-21 08:28:31 -08:00
Christian Legnitto
9a634bb8e2 Add fake features to integration crates 2020-01-21 08:17:49 -08:00
Christian Legnitto
16f34db12f Add async feature flag 2020-01-21 08:04:08 -08:00
Christian Legnitto
80ef24fc12 Break dep cycle again 2020-01-21 07:53:36 -08:00
Christian Legnitto
98caeefbc0 Break dep cycle with features 2020-01-21 00:02:26 -08:00
Christian Legnitto
89e17abbb0 Fix makefiles for benchmarks 2020-01-20 23:42:57 -08:00
Christian Legnitto
c6becfe234 Fix juniper_codegen tests under async 2020-01-20 23:38:44 -08:00
Christian Legnitto
e97d25d650 Fix formatting 2020-01-20 23:29:29 -08:00
Christian Legnitto
6aebe5a30f Add features to juniper_benchmarks 2020-01-20 23:23:42 -08:00
Christian Legnitto
ad3c7ef6d9 Add tests with async features enabled to CI 2020-01-20 23:05:08 -08:00
Christian Legnitto
7681f42933 Merge remote-tracking branch 'upstream/master' into async-await 2020-01-20 22:47:05 -08:00
iancormac84
001cabc9e9 Changes. 2020-01-18 17:14:35 -08:00
iancormac84
c6ac0bdcef Add changes from async-await branch to Changelog. 2020-01-18 17:14:35 -08:00
Christian Legnitto
fc7827605c Release juniper_warp 0.5.2 2020-01-18 17:14:35 -08:00
Christian Legnitto
0542c3aeac Release juniper_rocket 0.5.2 2020-01-18 17:14:35 -08:00
Christian Legnitto
37d2b195bc Release juniper_iron 0.6.2 2020-01-18 17:14:35 -08:00
Christian Legnitto
9d3cfc1c59 Release juniper_hyper 0.5.2 2020-01-18 17:14:35 -08:00
Christian Legnitto
73dc5cd5b8 Release juniper 0.14.2 2020-01-18 17:14:35 -08:00
Christian Legnitto
a5ccf8c2a1 Release juniper_codegen 0.14.2 2020-01-18 17:14:35 -08:00
Christian Legnitto
3c41769cb7 Update quickstart on every release (#485) 2020-01-18 17:14:35 -08:00
Massimo Cairo
9fe1c29889 Validate variables of the executed operation only (#462)
* Validate variables of the executed operation only

* Use `unreachable!` in `validate_var_defs`.

Use `unreachable!` instead of `panic!` on invalid variable types,
since thay have already been checked during document validation.

* Fix formatting in `validation/input_value.rs`
2020-01-18 17:14:35 -08:00
Alexander Simmerl
16967d7d98 Add example of how to construct null in graphql_value 2020-01-18 17:14:35 -08:00
Samuel Hurel
5b1c5c697a Add note on complex fields impl block in doc (#483) 2020-01-18 17:14:35 -08:00
Massimo Cairo
d4c75f0ba5 Fix unused variable error message
Was copied from undefined variable error message.
2020-01-18 17:14:35 -08:00
Jens Krause
14986ff419 Use latest graphiql (v0.17.2) (#477)
incl. upgrade to latest React
2020-01-18 17:14:35 -08:00
Jens Krause
c342ecf73a Use latest graphql-playground (#476) 2020-01-18 17:14:35 -08:00
James Harton
bc9183784f Loosen constraints on uuid version.
The `uuid` maintainers have started releasing in the `0.8` version train.  I've relaxed the version requirements on `juniper`'s dependencies to allow juniper users to specify a different version in their `Cargo.toml` and still have the integration work.
2020-01-18 17:14:35 -08:00
Klaus Purer
4a91d9d205 docs(quickstart): Fix juniper version so the examples work 2020-01-18 17:14:35 -08:00
Corey Farwell
758c7967d4 Bump to latest graphiql (#489)
https://github.com/graphql/graphiql/releases
2020-01-07 22:19:29 -08:00
Graeme Coupar
c2f0dd2aec Implement GraphQLTypeAsync for Arc (#479)
* Implement GraphQLTypeAsync for Arc

I'm building a GraphQL API using Juniper that proxies another GraphQL
API.  It does a large fetch upfront from the underlying GraphQL API,
transforms it into a different format and then implements some
resolvers that do some further filtering.

One of these resolvers ends up looking like:

```
async fn items(&self, ...) -> Vec<Item> {
    self.items.iter().filter(...).collect()
}
```

This causes us problems as we're returning owned Item's and Item is a
large nested structure that would be expensive to clone.

Our current work around was to put Item into an Arc, as Arc is
comparatively cheap to clone.  So our method becomes:

```
async fn items(&self, ...) -> Vec<Arc<Item>> {
    self.items.iter().filter(...).map(Arc::clone).collect()
}
```

However to support this we needed Arc to implement GraphQLTypeAsync.
This commit adds that support to juniper, by forwarding to the
GraphQLTypeAsync implementation for the contained type.

It's possible that we could have acheived something similar by adding
some lifetimes to our resolver and returning a reference, but using an
Arc was easier for us in this case.  I'm not sure if there's any reason
why this would be a bad addition to Juniper overall?

* Move GraphQLTypeAsync for Arc<T> into pointers.rs
2019-12-22 14:54:03 -08:00
danieleades
6fa6c20fa7 address clippy::all lints (#486) 2019-12-17 20:37:46 -08:00
Christian Legnitto
1b71ea68b0 Release juniper_warp 0.5.2 2019-12-16 21:57:17 -08:00
Christian Legnitto
e3274465d1 Release juniper_rocket 0.5.2 2019-12-16 21:56:20 -08:00
Christian Legnitto
24a01b8351 Release juniper_iron 0.6.2 2019-12-16 21:55:31 -08:00
Christian Legnitto
9ce7397050 Release juniper_hyper 0.5.2 2019-12-16 21:54:32 -08:00
Christian Legnitto
eddf948dad Release juniper 0.14.2 2019-12-16 21:53:51 -08:00
Christian Legnitto
e4cfc4b09f Release juniper_codegen 0.14.2 2019-12-16 21:52:50 -08:00
Christian Legnitto
cd0142ff52
Update quickstart on every release (#485) 2019-12-16 21:47:48 -08:00
Massimo Cairo
675ae060f3 Validate variables of the executed operation only (#462)
* Validate variables of the executed operation only

* Use `unreachable!` in `validate_var_defs`.

Use `unreachable!` instead of `panic!` on invalid variable types,
since thay have already been checked during document validation.

* Fix formatting in `validation/input_value.rs`
2019-12-16 00:17:13 -08:00
David Pedersen
4180019679
Merge pull request #484 from xla/graphql-value-null-example
Add example of how to construct null in graphql_value
2019-12-15 15:42:46 +01:00
Alexander Simmerl
26bfe7652f
Add example of how to construct null in graphql_value 2019-12-15 13:31:24 +01:00