Commit graph

929 commits

Author SHA1 Message Date
Christian Legnitto
0c83ffde2a
Fix release replacements. (#825)
Some crates need to rewrite values when they are released in other crates. It turns out, by default we use a general config _build/release.toml. So it turns out these local-to-the-crate release.tomls were not being used unless explicitly chosen in the local-to-the-crate Makefile.toml. This removes the dead release.tomls and overrides the ones that need to edit other crates on release.
2020-12-11 19:20:05 -10:00
Graeme Coupar
fe86dbb782
Mark Arc with IsInputType & IsOutputType. (#822)
* Mark `Arc` with `IsInputType` & `IsOutputType`.

We've just updated a service we work with to the latest release of
juniper (it's been on a fairly old master commit for some time).  In
this service we have some fields that are contained within `Arc`s, which
I added support for in #479.

Since then it seems the new marker traits of `IsInputType` &
`IsOutputType` have been added, but they do not support `Arc`, leading
to:

```
error[E0277]: the trait bound `Arc<menu::Menu>: IsOutputType<__S>` is not satisfied
  --> src/graphql.rs:36:1
   |
36 | #[juniper::graphql_object(Context=Context)]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `Arc<menu::Menu>`
   |
   = note: required by `juniper::marker::IsOutputType::mark`
   = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
```

This commit adds support for those, mirroring the support for `Box`.

I'm not sure if there's a good place to add a test for this
functionality so that regressions can be avoided in the future?

* Add Arc tests & FromInputValue for Arc<T>
2020-12-11 16:30:41 -10:00
Christian Legnitto
6326acde33
Fix some clippy lints (#809) 2020-12-10 21:41:23 -10:00
Kunjan Dalal
b418869f95
Update actix and juniper_actix (#823) 2020-12-10 21:40:49 -10:00
Christian Legnitto
1c4497b66c Release juniper_actix 0.2.0 2020-12-09 20:11:02 -10:00
Christian Legnitto
0b6a8895e4 Fix juniper_actix releases 2020-12-09 20:09:35 -10:00
Christian Legnitto
9a8d98a0b1 Release juniper_warp 0.6.0 2020-12-09 20:06:03 -10:00
Christian Legnitto
270deb24dc Fix warp releases 2020-12-09 20:05:14 -10:00
Christian Legnitto
fe1bcfcb7a Release juniper_graphql_ws 0.2.0 2020-12-09 20:00:07 -10:00
Christian Legnitto
58dcba1c81 Fix version bumps and releases for juniper_graphql_ws 2020-12-09 19:59:12 -10:00
Christian Legnitto
b190a7fade Release juniper_subscriptions 0.15.0 2020-12-09 19:50:48 -10:00
Christian Legnitto
2578cbb3dd Don't override ignore list when really releasing some
packages
2020-12-09 19:49:43 -10:00
Christian Legnitto
ec18b6db51 Make non-test partial releases work 2020-12-09 19:45:56 -10:00
Christian Legnitto
53a2e85eec Make partial releases actually work.
This was referencing a target that does not exist.
The `-some` targets are there to merely look the the
env variable for overrides
2020-12-09 19:42:33 -10:00
Christian Legnitto
e7555078e1 Skip publishing juniper_rocket_async
This currently requires a git commit of
Rocket and thus cannot be published to crates.io
2020-12-09 19:31:01 -10:00
Christian Legnitto
5436288dae Release juniper_rocket 0.6.0 2020-12-09 19:23:01 -10:00
Christian Legnitto
d04690538e Release juniper_iron 0.7.0 2020-12-09 19:21:53 -10:00
Christian Legnitto
17523aebd4 Release juniper_hyper 0.6.0 2020-12-09 19:20:43 -10:00
Christian Legnitto
bfe627e573 Release juniper 0.15.0 2020-12-09 19:19:43 -10:00
Christian Legnitto
d63fdef321 Release juniper_codegen 0.15.0 2020-12-09 19:19:00 -10:00
Lukas Kalbertodt
2c15ea798c
Check type before resolving in inline fragments to fix panic when using inline fragments with interfaces (#816, #815) 2020-12-09 20:26:59 +02:00
Zak
4ffd276a5b
Allow raw identifier for field arguments in #[graphql_object] macro (#812, #786) 2020-11-26 12:46:06 +02:00
Christian Legnitto
f3170c7adf
Examples and benchmarks are not released to crates.io (#808) 2020-11-16 07:24:08 -10: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
tyranron
8783496c68
Mention an example of migration from graphql-interface! to #[graphql_interface] in README 2020-11-14 14:48:53 +01: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
Kunjan Dalal
4c40826eff
explicit origin is required with new CORS (#802)
Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
2020-11-04 20:44:16 -08:00
Lucas Pickering
200896053a
Fix #500 (crash from look_ahead on nested fragments) (#800) 2020-11-04 15:11:25 -08:00
David Pedersen
eca049ac28
Implement IntoFieldError for Infallible (#796)
Makes it possible to use `Result<T, Infallible>` as your return type
from resolvers, which can be handy sometimes.
2020-10-29 06:39:59 -07:00
Christian Legnitto
f6ec735ba9
Uncomment tests that now work (#797)
* Uncomment tests that now work

* Fix formatting
2020-10-28 20:40:35 -07: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
tyranron
61d1365b15
Test GraphQL scalar implementation using custom ScalarValue (#791) 2020-10-23 12:22:37 +02:00
dependabot-preview[bot]
3e4cf680e2
Upgrade 'actix-cors' crate to 0.5 version (#792)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: tyranron <tyranron@gmail.com>
2020-10-20 12:57:14 +03: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
dependabot-preview[bot]
31d339b3a9
Upgrade 'criterion' crate to 0.3 version (#703)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
Co-authored-by: tyranron <tyranron@gmail.com>
2020-10-19 12:55:42 +03:00
dependabot-preview[bot]
dd69375e59
Upgrade 'env_logger' crate to 0.8 version (#789)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-10-19 12:23:17 +03:00
Igor Pashev
c964fd805c
Allow disabling case conversion (#765) 2020-10-13 12:34:36 -04:00
Stijn Frishert
68210f54ca
impl Display for ID (#783) 2020-10-10 07:17:33 -07:00
dependabot-preview[bot]
746aff34a5
Update actix-cors requirement from 0.3.0 to 0.4.1 (#778)
Updates the requirements on [actix-cors](https://github.com/actix/actix-extras) to permit the latest version.
- [Release notes](https://github.com/actix/actix-extras/releases)
- [Commits](https://github.com/actix/actix-extras/compare/cors-v0.3.0...cors-v0.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-10-08 02:57:47 -10:00
Kai Ren
46cde4fb85
Fix parsing f64 from Scalar::Int (#777) 2020-10-07 14:40:36 -10:00
tyranron
f914322ef4
Mention #[graphql_interface] macro in CHANGELOG (#682) 2020-10-07 10:20:11 +02:00
tyranron
6d4a0a8709
Fill up missing docs for #[graphql_interface] macro (#682) 2020-10-07 10:09:01 +02:00
tyranron
b1a0366112
Fix interfaces description in Book (#682, #658) 2020-10-06 11:58:30 +02:00
Kai Ren
cbf16c5a33
Make interfaces great again! (#682)
* Bootstrap

* Upd

* Bootstrap macro

* Revert stuff

* Correct PoC to compile

* Bootstrap #[graphql_interface] expansion

* Bootstrap #[graphql_interface] meta parsing

* Bootstrap #[graphql_interface] very basic code generation [skip ci]

* Upd trait code generation and fix keywords usage [skip ci]

* Expand trait impls [skip ci]

* Tune up objects [skip ci]

* Finally! Complies at least... [skip ci]

* Parse meta for fields and its arguments [skip ci]

- also, refactor and bikeshed new macros code

* Impl filling fields meta and bootstrap field resolution [skip ci]

* Poking with fields resolution [skip ci]

* Solve Rust's teen async HRTB problems [skip ci]

* Start parsing trait methods [skip ci]

* Finish parsing fields from trait methods [skip ci]

* Autodetect trait asyncness and allow to specify it [skip ci]

* Allow to autogenerate trait object alias via attribute

* Support generics in trait definition and asyncify them correctly

* Temporary disable explicit async

* Cover arguments and custom names/descriptions in tests

* Re-enable tests with explicit async and fix the codegen to satisfy it

* Check implementers are registered in schema and vice versa

* Check argument camelCases

* Test argument defaults, and allow Into coercions for them

* Re-enable markers

* Re-enable markers and relax Sized requirement on IsInputType/IsOutputType marker traits

* Revert 'juniper_actix' fmt

* Fix missing marks for object

* Fix subscriptions marks

* Deduce result type correctly via traits

* Final fixes

* Fmt

* Restore marks checking

* Support custom ScalarValue

* Cover deprecations with tests

* Impl dowcasting via methods

* Impl dowcasting via external functions

* Support custom context, vol. 1

* Support custom context, vol. 2

* Cover fallible field with test

* Impl explicit generic ScalarValue, vol.1

* Impl explicit generic ScalarValue, vol.2

* Allow passing executor into methods

* Generating enum, vol.1

* Generating enum, vol.2

* Generating enum, vol.3

* Generating enum, vol.3

* Generating enum, vol.4

* Generating enum, vol.5

* Generating enum, vol.6

* Generating enum, vol.7

* Generating enum, vol.8

* Refactor juniper stuff

* Fix juniper tests, vol.1

* Fix juniper tests, vol.2

* Polish 'juniper' crate changes, vol.1

* Polish 'juniper' crate changes, vol.2

* Remove redundant stuf

* Polishing 'juniper_codegen', vol.1

* Polishing 'juniper_codegen', vol.2

* Polishing 'juniper_codegen', vol.3

* Polishing 'juniper_codegen', vol.4

* Polishing 'juniper_codegen', vol.5

* Polishing 'juniper_codegen', vol.6

* Polishing 'juniper_codegen', vol.7

* Polishing 'juniper_codegen', vol.8

* Polishing 'juniper_codegen', vol.9

* Fix other crates tests and make Clippy happier

* Fix examples

* Add codegen failure tests, vol. 1

* Add codegen failure tests, vol. 2

* Add codegen failure tests, vol.3

* Fix codegen failure tests accordingly to latest nightly Rust

* Fix codegen when interface has no implementers

* Fix warnings in book tests

* Describing new interfaces in Book, vol.1

Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
2020-10-05 21:21:01 -10:00
Camille TJHOA
1e733cc793
Fix context in quickstart (#772) 2020-10-01 07:14:01 -10:00
Kunjan Dalal
8b79f5b1f1
Update Actix to the latest version (#761)
* actix updated to latest version and actix rt removed

* actix rt added back as dev dep
2020-09-12 06:32:15 -10:00