Skip to content

interface field as interface inherit to maping not implement error #1093

Answered by ilslv
stanhangzhou asked this question in Q&A
Discussion options

You must be logged in to vote

@stanhangzhou Rust representation of schema you've described in original question would look something like:

#[graphql_interface]
trait ImageData {
    fn src(&self) -> String;
    fn content_type(&self) -> Option<String>,
}

#[graphql_interface]
trait CollectionVolume {
    fn change_24h(&self) -> Option<i32>;
}

#[graphql_interface]
trait UserAvatarOmit {
    fn id(&self) -> String;
    fn token_id(&self) -> String;
    fn image(&self) -> ImageDataValue;
}

#[graphql_interface]
trait UserAvatarOmit {
    fn address(&self) -> String;
    fn is_verified(&self) -> bool;
    fn name(&self) -> String;
    fn avatar(&self) -> Option<UserAvatarOmitValue>;
}

#[graphql_interface]
trait Collecti…

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ilslv
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@stanhangzhou
Comment options

Answer selected by ilslv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants