Commit graph

56 commits

Author SHA1 Message Date
Kai Ren
72ed45a77c
Rework CI and project toolchain (#1043)
- 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
fec998dce8
Update chrono crate scalars according to graphql-scalars.dev (#1010)
- remove `scalar-naivetime` feature
- disable `chrono` feature by default
2022-03-04 17:53:27 +02:00
ilslv
1aa1000c3b
Redesign #[graphql_interface] macro (#1009, #1000, #814)
- 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
bc66a2d898
Upgrade actix-web beta versions (#995) 2021-11-23 10:49:55 +02:00
tyranron
74afe4c04a
Use graphql_value!() macro in tests asap 2021-08-13 02:12:01 +03:00
Kai Ren
a3fda7363d
Rework codegen for GraphQL objects and subscriptions (#971, #421)
- 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
dependabot[bot]
88a7571b30
Update env_logger requirement from 0.8.1 to 0.9.0 (#964)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: tyranron <tyranron@gmail.com>
2021-07-16 12:01:18 +03:00
Christian Legnitto
1146a01331
Use actix betas to allow publishing on crates.io (#954) 2021-07-06 16:23:41 -07:00
Jordão Rodrigues Oliveira Rosario
6ada6b09a9
Actix v4.0.0-beta.8 support (#952) 2021-07-06 15:41:42 -07:00
Jordão Rodrigues Oliveira Rosario
739cc3bfc2
Upgraded tokio, warp, hyper and actix (#912)
* Upgraded tokio, warp, hyper and actix

* Code formatting

* actix-web temporary version fix specification

* Error handling fix on juniper_rocket

Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
2021-06-28 20:22:45 -10:00
Graeme Coupar
824cd4081b
Update juniper_codegen for syn 1.0.60 (#861)
* Update juniper_codegen for syn 1.0.60

syn 1.0.60 has updated it's `Type::__Nonexhaustive` to
`Type::TestExhaustive`, breaking juniper.  This updates juniper to use
the recommended idiom for doing exhaustive matching on `Type`, which
fixes this.

Not entirely clear if we need exhaustive matching here or if we could
just use a fallback, but this fixes the build at least.

Also updated the minimum syn so users have to pull it in

* Update example to use relative deps

As otherwise CI fails on this branch
2021-01-26 07:41:03 -10:00
dependabot-preview[bot]
4f3939075a
Update reqwest requirement from 0.10 to 0.11 (#842)
Updates the requirements on [reqwest](https://github.com/seanmonstar/reqwest) to permit the latest version.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.10.0...v0.11.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-05 22:44:11 -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
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
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
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
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
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
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
Mihai Dinculescu
45c16acc6e
Actix subscriptions tests (#736)
* Actix subscriptions tests

* Use LocalBoxFuture instead of async-trait

* expose-test-schema already includes serde_json

* Add anyhow to juniper dev-dependencies

* The HTTP test helpers are not needed for juniper tests

* juniper_actix does not need tokio in dev-dependencies

Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
2020-08-18 21:08:53 -10:00
Mihai Dinculescu
8d7ba8295c
Impl subscriptions for juniper_actix (#716)
* Impl subscriptions for juniper_actix

* Add random_human example subscription

* Add actix_subscriptions example to CI

* fixup! Add random_human example subscription

* Migrate actix subscriptions to juniper_graphql_ws

* Simplify error handling

* Change unwrap to expect

* Close connection on server serialization error

Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
2020-08-09 12:19:34 -10:00
Chris
84c9720b53
GraphQL-WS crate and Warp subscriptions update (#721)
* update pre-existing juniper_warp::subscriptions

* initial draft

* finish up, update example

* polish + timing test

* fix pre-existing bug

* rebase updates

* address comments

* add release.toml

* makefile and initial changelog

* add new Cargo.toml to juniper/release.toml
2020-07-28 22:23:44 -10:00
Christian Legnitto
4647a32b33
Add examples to CI (#714) 2020-07-20 21:38:22 -10:00
Kai Ren
4d77a1a9b9
Strip redundant Send/Sync bounds (#688)
Additionally:
- strip redundant type parameters for juniper::Context in some core definitions and reuse associated type
2020-06-30 18:13:15 +03:00
Joao Neves
f19d498254
Upgrade reqwest to 0.10 version and use rustls to remove transitive OpenSSL (#677)
- revive `warp_async` example (#659)

Co-authored-by: Allan Calix <contact@allancalix.com>
Co-authored-by: Kai Ren <tyranron@gmail.com>
2020-06-14 16:29:08 +03:00
Jordão Rodrigues Oliveira Rosario
7e8724751f
Initial implementation of Subscription Docs (#609)
Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
2020-04-16 20:16:00 -10:00
nWacky
dbe2c67cb8
Minor improvements to subscriptions functionality (#591)
Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
2020-03-30 20:43:00 -07:00
imspace
3b465cbf04
Fix websocket connection in warp subscriptions example (#583) 2020-03-24 17:20:34 -07:00
Gero Posmyk-Leinemann
5f777e8a6d
Clippy cleanup (#579) 2020-03-20 09:11:06 -07:00
nWacky
eb941e509a
Add subscription support (#433)
Co-authored-by: tyranron <tyranron@gmail.com>
Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
2020-03-18 20:31:36 -07:00
Christoph Herzog
ce3cf45ca9 Rename object proc macro to graphql_object 2019-11-16 02:57:48 +01:00
nWacky
a5580a939d Update most crates to futures 0.3, add todos on not updated crates 2019-11-12 12:04:09 +00:00
nWacky
778606c050
Fix bad merge [skip ci] 2019-11-06 12:01:50 +03:00
nWacky
ec76bf5ff2
Fix cargo.toml in warp_async 2019-11-05 11:20:08 +03:00
nWacky
e3c12e31fc
Format 2019-11-05 11:14:53 +03:00
nWacky
820f472f2c
Add resolve_into_type_async 2019-11-05 11:14:19 +03:00
tyranron
5d3ed9ac72
Remove async_closure feature usage 2019-10-10 00:07:10 +02:00
tyranron
639c29e91e
Upgrade futures-preview, tokio crates and remove unnecessary 'async_await' feature 2019-10-09 20:11:34 +02:00
Christoph Herzog
ef3720cb67 examples/warp_async: update dependency paths 2019-08-21 15:48:31 +02:00
Christoph Herzog
746bdb5aae Add warp_async example 2019-08-21 15:48:31 +02:00
theduke
c008658052 Moving examples to juniper crate (for now) 2017-07-12 21:51:24 +02:00
Magnus Hallin
3f277ba8b4 Add Rocket integration to the HTTP test suite 2017-06-14 18:21:05 +02:00
Magnus Hallin
e82534aced Initial work on Rocket integration 2017-06-14 15:50:27 +02:00
Magnus Hallin
7041efeda9 Merge branch 'drop_rustc_serialization' of https://github.com/TheServerAsterisk/juniper into TheServerAsterisk-drop_rustc_serialization
# Conflicts:
#	examples/server.rs
2017-06-14 08:51:49 +02:00
Magnus Hallin
95b4124f6b Provide better error message when running example without features
Even better would be if "cargo run --example server" would
automatically enable those features, but Cargo can't do that right now.
2017-05-18 10:31:53 +02:00
rpiper
41112d0b6d Drop support for rustc-serialization and use serde by default. 2017-04-30 20:07:36 -06:00
Michael Macias
b2e75bf4f6 Update to iron 0.5
* `Url::into_generic_url` was deprecated in 0.4.1. The `Into` trait is
    used instead.
  * iron/logger removed support for ANSI terminal colors in 0.2.0, which
    makes logging work in the Command Prompt on Windows.

Fixes #21
2017-02-16 02:08:26 -06:00
Magnus Hallin
3d8f88f59e Fix 1.12.1 compatibility 2017-02-04 11:37:01 +01:00