impl From<ID> for Cursor
-use crate::{InputValueError, InputValueResult, Result, ScalarType, Value};
+use crate::{InputValueError, InputValueResult, Result, ScalarType, Value, ID};
use async_graphql_derive::Scalar;
use std::ops::{Deref, DerefMut};
@@ -32,6 +32,12 @@ where
}
}
+impl From<ID> for Cursor {
+ fn from(id: ID) -> Self {
+ Cursor(id.into())
+ }
+}
+
#[Scalar(internal)]
impl ScalarType for Cursor {
fn type_name() -> &'static str {
