impl From<ID> for Cursor
This commit is contained in:
parent
0344b0b996
commit
9993e86427
|
@ -1,4 +1,4 @@
|
|||
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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user