Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
elcharitas authored Jun 19, 2024
2 parents a875f1d + 3571fd9 commit 6a6b041
Show file tree
Hide file tree
Showing 22 changed files with 170 additions and 176 deletions.
14 changes: 4 additions & 10 deletions juniper/src/http/graphiql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,19 @@ pub fn graphiql_source(
graphql_endpoint_url: &str,
subscriptions_endpoint_url: Option<&str>,
) -> String {
let subscriptions_endpoint = if let Some(sub_url) = subscriptions_endpoint_url {
sub_url
} else {
""
};

include_str!("graphiql.html").replace(
"<!-- inject -->",
&format!(
// language=JavaScript
"
var JUNIPER_URL = '{graphql_url}';
var JUNIPER_SUBSCRIPTIONS_URL = '{graphql_subscriptions_url}';
var JUNIPER_URL = '{juniper_url}';
var JUNIPER_SUBSCRIPTIONS_URL = '{juniper_subscriptions_url}';
{grahiql_js}
",
graphql_url = graphql_endpoint_url,
graphql_subscriptions_url = subscriptions_endpoint,
juniper_url = graphql_endpoint_url,
juniper_subscriptions_url = subscriptions_endpoint_url.unwrap_or_default(),
grahiql_js = include_str!("graphiql.js"),
),
)
Expand Down
2 changes: 1 addition & 1 deletion juniper/src/types/scalars.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{char, fmt, marker::PhantomData, ops::Deref, rc::Rc, thread::JoinHandle, u32};
use std::{char, fmt, marker::PhantomData, ops::Deref, rc::Rc, thread::JoinHandle};

use serde::{Deserialize, Serialize};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ error[E0277]: the trait bound `ObjectA: IsInputType<__S>` is not satisfied
| ^^^^^^^ the trait `IsInputType<__S>` is not implemented for `ObjectA`
|
= help: the following other types implement trait `IsInputType<S>`:
<bool as IsInputType<__S>>
<i32 as IsInputType<__S>>
<f64 as IsInputType<__S>>
<Object as IsInputType<__S>>
<Box<T> as IsInputType<S>>
<juniper::schema::model::DirectiveLocation as IsInputType<__S>>
<&T as IsInputType<S>>
<Arc<T> as IsInputType<S>>
<Box<T> as IsInputType<S>>
<ID as IsInputType<__S>>
<Object as IsInputType<__S>>
<TypeKind as IsInputType<__S>>
<Vec<T> as IsInputType<S>>
<[T; N] as IsInputType<S>>
and $N others

error[E0277]: the trait bound `ObjectA: FromInputValue<__S>` is not satisfied
Expand All @@ -25,14 +25,14 @@ error[E0277]: the trait bound `ObjectA: FromInputValue<__S>` is not satisfied
| ^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjectA`
|
= help: the following other types implement trait `FromInputValue<S>`:
<bool as FromInputValue<__S>>
<i32 as FromInputValue<__S>>
<f64 as FromInputValue<__S>>
<Object as FromInputValue<__S>>
<Box<T> as FromInputValue<S>>
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
<Arc<T> as FromInputValue<S>>
<Box<T> as FromInputValue<S>>
<ID as FromInputValue<__S>>
<Object as FromInputValue<__S>>
<TypeKind as FromInputValue<__S>>
<Vec<T> as FromInputValue<S>>
<[T; N] as FromInputValue<S>>
<bool as FromInputValue<__S>>
and $N others
note: required by a bound in `Registry::<'r, S>::arg`
--> $WORKSPACE/juniper/src/executor/mod.rs
Expand All @@ -50,14 +50,14 @@ error[E0277]: the trait bound `ObjectA: FromInputValue<__S>` is not satisfied
| ^^^^^^^^^^^^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjectA`
|
= help: the following other types implement trait `FromInputValue<S>`:
<bool as FromInputValue<__S>>
<i32 as FromInputValue<__S>>
<f64 as FromInputValue<__S>>
<Object as FromInputValue<__S>>
<Box<T> as FromInputValue<S>>
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
<Arc<T> as FromInputValue<S>>
<Box<T> as FromInputValue<S>>
<ID as FromInputValue<__S>>
<Object as FromInputValue<__S>>
<TypeKind as FromInputValue<__S>>
<Vec<T> as FromInputValue<S>>
<[T; N] as FromInputValue<S>>
<bool as FromInputValue<__S>>
and $N others
= note: this error originates in the derive macro `GraphQLInputObject` (in Nightly builds, run with -Z macro-backtrace for more info)

Expand All @@ -68,13 +68,13 @@ error[E0277]: the trait bound `ObjectA: ToInputValue<_>` is not satisfied
| ^^^^^^^^^^^^^^^^^^ the trait `ToInputValue<_>` is not implemented for `ObjectA`
|
= help: the following other types implement trait `ToInputValue<S>`:
<bool as ToInputValue<__S>>
<i32 as ToInputValue<__S>>
<f64 as ToInputValue<__S>>
<Object as ToInputValue<__S>>
<Box<T> as ToInputValue<S>>
<juniper::schema::model::DirectiveLocation as ToInputValue<__S>>
<&'a T as ToInputValue<S>>
<&'a [T] as ToInputValue<S>>
<&'a str as ToInputValue<S>>
<Arc<T> as ToInputValue<S>>
<Box<T> as ToInputValue<S>>
<ID as ToInputValue<__S>>
<Object as ToInputValue<__S>>
<TypeKind as ToInputValue<__S>>
and $N others
= note: this error originates in the derive macro `GraphQLInputObject` (in Nightly builds, run with -Z macro-backtrace for more info)
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
| ^^^^^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
|
= help: the following other types implement trait `IsOutputType<S>`:
<bool as IsOutputType<__S>>
<i32 as IsOutputType<__S>>
<f64 as IsOutputType<__S>>
<CharacterValueEnum as IsOutputType<__S>>
<Box<T> as IsOutputType<S>>
<juniper::meta::Field<'a, S> as IsOutputType<S>>
<&T as IsOutputType<S>>
<Arc<T> as IsOutputType<S>>
<Argument<'a, S> as IsOutputType<S>>
<Box<T> as IsOutputType<S>>
<CharacterValueEnum as IsOutputType<__S>>
<EnumValue as IsOutputType<__S>>
<ID as IsOutputType<__S>>
<SchemaType<'a, S> as IsOutputType<S>>
and $N others
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
| ^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
|
= help: the following other types implement trait `IsOutputType<S>`:
<bool as IsOutputType<__S>>
<i32 as IsOutputType<__S>>
<f64 as IsOutputType<__S>>
<CharacterValueEnum as IsOutputType<__S>>
<Box<T> as IsOutputType<S>>
<juniper::meta::Field<'a, S> as IsOutputType<S>>
<&T as IsOutputType<S>>
<Arc<T> as IsOutputType<S>>
<Argument<'a, S> as IsOutputType<S>>
<Box<T> as IsOutputType<S>>
<CharacterValueEnum as IsOutputType<__S>>
<EnumValue as IsOutputType<__S>>
<ID as IsOutputType<__S>>
<SchemaType<'a, S> as IsOutputType<S>>
and $N others
20 changes: 10 additions & 10 deletions tests/codegen/fail/interface/trait/argument_non_input_type.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ error[E0277]: the trait bound `ObjA: IsInputType<__S>` is not satisfied
| ^^^^ the trait `IsInputType<__S>` is not implemented for `ObjA`
|
= help: the following other types implement trait `IsInputType<S>`:
<bool as IsInputType<__S>>
<i32 as IsInputType<__S>>
<f64 as IsInputType<__S>>
<Box<T> as IsInputType<S>>
<juniper::schema::model::DirectiveLocation as IsInputType<__S>>
<&T as IsInputType<S>>
<Arc<T> as IsInputType<S>>
<Box<T> as IsInputType<S>>
<ID as IsInputType<__S>>
<TypeKind as IsInputType<__S>>
<Vec<T> as IsInputType<S>>
<[T; N] as IsInputType<S>>
<[T] as IsInputType<S>>
and $N others

error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
Expand All @@ -25,14 +25,14 @@ error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
| ^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
|
= help: the following other types implement trait `FromInputValue<S>`:
<bool as FromInputValue<__S>>
<i32 as FromInputValue<__S>>
<f64 as FromInputValue<__S>>
<Box<T> as FromInputValue<S>>
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
<Arc<T> as FromInputValue<S>>
<Box<T> as FromInputValue<S>>
<ID as FromInputValue<__S>>
<TypeKind as FromInputValue<__S>>
<Vec<T> as FromInputValue<S>>
<[T; N] as FromInputValue<S>>
<bool as FromInputValue<__S>>
<f64 as FromInputValue<__S>>
and $N others
note: required by a bound in `Registry::<'r, S>::arg`
--> $WORKSPACE/juniper/src/executor/mod.rs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
| ^^^^^^^^^^^^^^^^^^^^ the trait `From<[bool; 3]>` is not implemented for `[bool; 2]`, which is required by `[bool; 3]: Into<_>`
|
= help: the following other types implement trait `From<T>`:
<[bool; N] as From<Mask<T, N>>>
<[T; N] as From<Simd<T, N>>>
<[T; 10] as From<(T, T, T, T, T, T, T, T, T, T)>>
<[T; 11] as From<(T, T, T, T, T, T, T, T, T, T, T)>>
<[T; 12] as From<(T, T, T, T, T, T, T, T, T, T, T, T)>>
<[T; 1] as From<(T,)>>
<[T; 2] as From<(T, T)>>
<[T; 3] as From<(T, T, T)>>
<[T; 4] as From<(T, T, T, T)>>
<[T; 5] as From<(T, T, T, T, T)>>
<[T; 6] as From<(T, T, T, T, T, T)>>
and $N others
= note: required for `[bool; 3]` to implement `Into<[bool; 2]>`
= note: this error originates in the attribute macro `graphql_interface` (in Nightly builds, run with -Z macro-backtrace for more info)
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
| ^^^^^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
|
= help: the following other types implement trait `IsOutputType<S>`:
<bool as IsOutputType<__S>>
<i32 as IsOutputType<__S>>
<f64 as IsOutputType<__S>>
<CharacterValueEnum as IsOutputType<__S>>
<Box<T> as IsOutputType<S>>
<juniper::meta::Field<'a, S> as IsOutputType<S>>
<&T as IsOutputType<S>>
<Arc<T> as IsOutputType<S>>
<Argument<'a, S> as IsOutputType<S>>
<Box<T> as IsOutputType<S>>
<CharacterValueEnum as IsOutputType<__S>>
<EnumValue as IsOutputType<__S>>
<ID as IsOutputType<__S>>
<SchemaType<'a, S> as IsOutputType<S>>
and $N others
40 changes: 20 additions & 20 deletions tests/codegen/fail/object/argument_non_input_type.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ error[E0277]: the trait bound `ObjA: IsInputType<__S>` is not satisfied
| ^^^^ the trait `IsInputType<__S>` is not implemented for `ObjA`
|
= help: the following other types implement trait `IsInputType<S>`:
<bool as IsInputType<__S>>
<i32 as IsInputType<__S>>
<f64 as IsInputType<__S>>
<Box<T> as IsInputType<S>>
<juniper::schema::model::DirectiveLocation as IsInputType<__S>>
<&T as IsInputType<S>>
<Arc<T> as IsInputType<S>>
<Box<T> as IsInputType<S>>
<ID as IsInputType<__S>>
<TypeKind as IsInputType<__S>>
<Vec<T> as IsInputType<S>>
<[T; N] as IsInputType<S>>
<[T] as IsInputType<S>>
and $N others

error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
Expand All @@ -25,14 +25,14 @@ error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
| ^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
|
= help: the following other types implement trait `FromInputValue<S>`:
<bool as FromInputValue<__S>>
<i32 as FromInputValue<__S>>
<f64 as FromInputValue<__S>>
<Box<T> as FromInputValue<S>>
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
<Arc<T> as FromInputValue<S>>
<Box<T> as FromInputValue<S>>
<ID as FromInputValue<__S>>
<TypeKind as FromInputValue<__S>>
<Vec<T> as FromInputValue<S>>
<[T; N] as FromInputValue<S>>
<bool as FromInputValue<__S>>
<f64 as FromInputValue<__S>>
and $N others
note: required by a bound in `Registry::<'r, S>::arg`
--> $WORKSPACE/juniper/src/executor/mod.rs
Expand All @@ -50,14 +50,14 @@ error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
| ^^^^^^^^^^^^^^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
|
= help: the following other types implement trait `FromInputValue<S>`:
<bool as FromInputValue<__S>>
<i32 as FromInputValue<__S>>
<f64 as FromInputValue<__S>>
<Box<T> as FromInputValue<S>>
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
<Arc<T> as FromInputValue<S>>
<Box<T> as FromInputValue<S>>
<ID as FromInputValue<__S>>
<TypeKind as FromInputValue<__S>>
<Vec<T> as FromInputValue<S>>
<[T; N] as FromInputValue<S>>
<bool as FromInputValue<__S>>
<f64 as FromInputValue<__S>>
and $N others
= note: this error originates in the attribute macro `graphql_object` (in Nightly builds, run with -Z macro-backtrace for more info)

Expand All @@ -68,14 +68,14 @@ error[E0277]: the trait bound `ObjA: FromInputValue<__S>` is not satisfied
| ^^^^ the trait `FromInputValue<__S>` is not implemented for `ObjA`
|
= help: the following other types implement trait `FromInputValue<S>`:
<bool as FromInputValue<__S>>
<i32 as FromInputValue<__S>>
<f64 as FromInputValue<__S>>
<Box<T> as FromInputValue<S>>
<juniper::schema::model::DirectiveLocation as FromInputValue<__S>>
<Arc<T> as FromInputValue<S>>
<Box<T> as FromInputValue<S>>
<ID as FromInputValue<__S>>
<TypeKind as FromInputValue<__S>>
<Vec<T> as FromInputValue<S>>
<[T; N] as FromInputValue<S>>
<bool as FromInputValue<__S>>
<f64 as FromInputValue<__S>>
and $N others

warning: unused variable: `obj`
Expand Down
6 changes: 3 additions & 3 deletions tests/codegen/fail/object/argument_wrong_default_array.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ error[E0277]: the trait bound `[bool; 2]: From<[bool; 3]>` is not satisfied
| ^^^^^^^^^^^^^^^^^ the trait `From<[bool; 3]>` is not implemented for `[bool; 2]`, which is required by `[bool; 3]: Into<_>`
|
= help: the following other types implement trait `From<T>`:
<[bool; N] as From<Mask<T, N>>>
<[T; N] as From<Simd<T, N>>>
<[T; 10] as From<(T, T, T, T, T, T, T, T, T, T)>>
<[T; 11] as From<(T, T, T, T, T, T, T, T, T, T, T)>>
<[T; 12] as From<(T, T, T, T, T, T, T, T, T, T, T, T)>>
<[T; 1] as From<(T,)>>
<[T; 2] as From<(T, T)>>
<[T; 3] as From<(T, T, T)>>
<[T; 4] as From<(T, T, T, T)>>
<[T; 5] as From<(T, T, T, T, T)>>
<[T; 6] as From<(T, T, T, T, T, T)>>
and $N others
= note: required for `[bool; 3]` to implement `Into<[bool; 2]>`
= note: this error originates in the attribute macro `graphql_object` (in Nightly builds, run with -Z macro-backtrace for more info)
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
| ^^^^^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
|
= help: the following other types implement trait `IsOutputType<S>`:
<bool as IsOutputType<__S>>
<i32 as IsOutputType<__S>>
<f64 as IsOutputType<__S>>
<ObjA as IsOutputType<__S>>
<Box<T> as IsOutputType<S>>
<juniper::meta::Field<'a, S> as IsOutputType<S>>
<&T as IsOutputType<S>>
<Arc<T> as IsOutputType<S>>
<Argument<'a, S> as IsOutputType<S>>
<Box<T> as IsOutputType<S>>
<EnumValue as IsOutputType<__S>>
<ID as IsOutputType<__S>>
<ObjA as IsOutputType<__S>>
<SchemaType<'a, S> as IsOutputType<S>>
and $N others
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ error[E0277]: the trait bound `ObjB: IsOutputType<__S>` is not satisfied
| ^^^^^^^^^^^^^ the trait `IsOutputType<__S>` is not implemented for `ObjB`
|
= help: the following other types implement trait `IsOutputType<S>`:
<bool as IsOutputType<__S>>
<i32 as IsOutputType<__S>>
<f64 as IsOutputType<__S>>
<ObjA as IsOutputType<__S>>
<Box<T> as IsOutputType<S>>
<juniper::meta::Field<'a, S> as IsOutputType<S>>
<&T as IsOutputType<S>>
<Arc<T> as IsOutputType<S>>
<Argument<'a, S> as IsOutputType<S>>
<Box<T> as IsOutputType<S>>
<EnumValue as IsOutputType<__S>>
<ID as IsOutputType<__S>>
<ObjA as IsOutputType<__S>>
<SchemaType<'a, S> as IsOutputType<S>>
and $N others
Loading

0 comments on commit 6a6b041

Please sign in to comment.