Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Feb 21, 2025
1 parent 75457eb commit af6e07a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions crates/torii/graphql/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ use super::object::model_data::ModelDataObject;
use super::types::ScalarType;
use super::utils;
use crate::constants::{
EMPTY_TYPE_NAME, ERC20_TYPE_NAME, ERC721_TYPE_NAME, QUERY_TYPE_NAME, SUBSCRIPTION_TYPE_NAME,
TOKEN_UNION_TYPE_NAME,
EMPTY_TYPE_NAME, ERC1155_TYPE_NAME, ERC20_TYPE_NAME, ERC721_TYPE_NAME, QUERY_TYPE_NAME,
SUBSCRIPTION_TYPE_NAME, TOKEN_UNION_TYPE_NAME,
};
use crate::object::controller::ControllerObject;
use crate::object::empty::EmptyObject;
use crate::object::erc::erc_token::{Erc20TokenObject, Erc721TokenObject, TokenObject};
use crate::object::erc::erc_token::{
Erc1155TokenObject, Erc20TokenObject, Erc721TokenObject, TokenObject,
};
use crate::object::erc::token_balance::ErcBalanceObject;
use crate::object::erc::token_transfer::ErcTransferObject;
use crate::object::event_message::EventMessageObject;
Expand Down Expand Up @@ -131,6 +133,7 @@ async fn build_objects(pool: &SqlitePool) -> Result<(Vec<ObjectVariant>, Vec<Uni
ObjectVariant::Basic(Box::new(PageInfoObject)),
ObjectVariant::Basic(Box::new(Erc721TokenObject)),
ObjectVariant::Basic(Box::new(Erc20TokenObject)),
ObjectVariant::Basic(Box::new(Erc1155TokenObject)),
ObjectVariant::Basic(Box::new(EmptyObject)),
];

Expand All @@ -141,7 +144,8 @@ async fn build_objects(pool: &SqlitePool) -> Result<(Vec<ObjectVariant>, Vec<Uni
// erc_token union object
let erc_token_union = Union::new(TOKEN_UNION_TYPE_NAME)
.possible_type(ERC20_TYPE_NAME)
.possible_type(ERC721_TYPE_NAME);
.possible_type(ERC721_TYPE_NAME)
.possible_type(ERC1155_TYPE_NAME);

unions.push(erc_token_union);

Expand Down

0 comments on commit af6e07a

Please sign in to comment.