Fix unit tests for latest nightly
This commit is contained in:
parent
847a38a4c6
commit
86b5319315
8 changed files with 33 additions and 28 deletions
|
@ -1,9 +1,4 @@
|
||||||
use std::{
|
use std::{char, fmt, iter::Peekable, str::CharIndices};
|
||||||
char, fmt,
|
|
||||||
iter::{Iterator, Peekable},
|
|
||||||
result::Result,
|
|
||||||
str::CharIndices,
|
|
||||||
};
|
|
||||||
|
|
||||||
use crate::parser::{SourcePosition, Spanning};
|
use crate::parser::{SourcePosition, Spanning};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use std::{error::Error, fmt, result::Result};
|
use std::{error::Error, fmt};
|
||||||
|
|
||||||
use smartstring::alias::String;
|
use smartstring::alias::String;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
//! Types used to describe a `GraphQL` schema
|
//! Types used to describe a `GraphQL` schema
|
||||||
|
|
||||||
use juniper::IntoFieldError;
|
use juniper::IntoFieldError;
|
||||||
use std::{
|
use std::{borrow::Cow, fmt};
|
||||||
borrow::{Cow, ToOwned},
|
|
||||||
fmt,
|
|
||||||
};
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
ast::{FromInputValue, InputValue, Type},
|
ast::{FromInputValue, InputValue, Type},
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
use std::{
|
use std::{char, fmt, marker::PhantomData, ops::Deref, rc::Rc, thread::JoinHandle, u32};
|
||||||
char, convert::From, fmt, marker::PhantomData, ops::Deref, rc::Rc, thread::JoinHandle, u32,
|
|
||||||
};
|
|
||||||
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
use std::{collections::HashSet, iter::Iterator};
|
use std::collections::HashSet;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
ast::InputValue,
|
ast::InputValue,
|
||||||
|
|
|
@ -611,16 +611,21 @@ where
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use std::{convert::Infallible, io};
|
use std::{convert::Infallible, io, sync::Arc, time::Duration};
|
||||||
|
|
||||||
use juniper::{
|
use juniper::{
|
||||||
futures::sink::SinkExt,
|
futures::{
|
||||||
|
future::{self, FutureExt as _},
|
||||||
|
sink::SinkExt,
|
||||||
|
stream::{self, BoxStream, StreamExt as _},
|
||||||
|
},
|
||||||
graphql_input_value, graphql_object, graphql_subscription, graphql_value, graphql_vars,
|
graphql_input_value, graphql_object, graphql_subscription, graphql_value, graphql_vars,
|
||||||
parser::{ParseError, Spanning},
|
parser::{ParseError, Spanning},
|
||||||
DefaultScalarValue, EmptyMutation, FieldError, FieldResult, RootNode, Variables,
|
DefaultScalarValue, EmptyMutation, FieldError, FieldResult, GraphQLError, RootNode,
|
||||||
|
Variables,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::*;
|
use super::{Connection, ConnectionConfig, NextPayload, Output, SubscribePayload};
|
||||||
|
|
||||||
struct Context(i32);
|
struct Context(i32);
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@ use std::{
|
||||||
use juniper::{
|
use juniper::{
|
||||||
futures::{
|
futures::{
|
||||||
channel::oneshot,
|
channel::oneshot,
|
||||||
future::{self, BoxFuture, Either, Future, FutureExt, TryFutureExt},
|
future::{self, BoxFuture, Either, Future, FutureExt as _, TryFutureExt as _},
|
||||||
stream::{self, BoxStream, SelectAll, StreamExt},
|
stream::{self, BoxStream, SelectAll, StreamExt as _},
|
||||||
task::{Context, Poll, Waker},
|
task::{Context, Poll, Waker},
|
||||||
Sink, Stream,
|
Sink, Stream,
|
||||||
},
|
},
|
||||||
|
@ -547,16 +547,21 @@ where
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use std::{convert::Infallible, io};
|
use std::{convert::Infallible, io, sync::Arc, time::Duration};
|
||||||
|
|
||||||
use juniper::{
|
use juniper::{
|
||||||
futures::sink::SinkExt,
|
futures::{
|
||||||
|
future::{self, FutureExt as _},
|
||||||
|
sink::SinkExt,
|
||||||
|
stream::{self, BoxStream, StreamExt as _},
|
||||||
|
},
|
||||||
graphql_input_value, graphql_object, graphql_subscription, graphql_value, graphql_vars,
|
graphql_input_value, graphql_object, graphql_subscription, graphql_value, graphql_vars,
|
||||||
parser::{ParseError, Spanning},
|
parser::{ParseError, Spanning},
|
||||||
DefaultScalarValue, EmptyMutation, FieldError, FieldResult, RootNode, Variables,
|
DefaultScalarValue, EmptyMutation, FieldError, FieldResult, GraphQLError, RootNode,
|
||||||
|
Variables,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::*;
|
use super::{Connection, ConnectionConfig, ConnectionErrorPayload, DataPayload, StartPayload};
|
||||||
|
|
||||||
struct Context(i32);
|
struct Context(i32);
|
||||||
|
|
||||||
|
|
|
@ -242,10 +242,15 @@ where
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod whole_responses_stream {
|
mod whole_responses_stream {
|
||||||
use futures::{stream, StreamExt as _};
|
use std::task::Poll;
|
||||||
use juniper::{graphql_value, DefaultScalarValue, ExecutionError, FieldError};
|
|
||||||
|
|
||||||
use super::*;
|
use futures::{stream, StreamExt as _};
|
||||||
|
use juniper::{
|
||||||
|
graphql_value, DefaultScalarValue, ExecutionError, ExecutionOutput, FieldError, Object,
|
||||||
|
Value, ValuesStream,
|
||||||
|
};
|
||||||
|
|
||||||
|
use super::whole_responses_stream;
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn with_error() {
|
async fn with_error() {
|
||||||
|
|
Loading…
Reference in a new issue