This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PageModule.fetchModule("./MyComponent") | |
|> Js.Promise.then_(m => send(SetRootElement(m()))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Query1 = [%graphql | |
{| | |
query { | |
someFieldWithInterfaceType { | |
id | |
...on ImplA { | |
a_only | |
} | |
...on ImplB { | |
b_only |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub struct Ctx { | |
pub db: request::PooledConnection, | |
} | |
impl Context for Ctx {} | |
pub fn context_factory(req: &mut Request) -> Ctx { | |
Ctx { | |
db: request::get_db(req), | |
} |