Open lifeart opened 3 years ago
right now I'm getting
it will be great to have kinda defaultContext
, to get things working, and defaultContext
may resolve syntheticOwner
.
to prevent memory leaks, setClient
may return destructor to call it manually in proper place
once i'm trying to manually create owner, I see:
Unable to find owner from the given context in glimmer-apollo setClient
import { setOwner } from '@glimmer/owner';
const owner = {};
import setupApolloClient from './configs/apollo';
export const router = new Router({
main: '',
second: '/second'
});
setOwner(router, owner);
setupApolloClient(router);
lol, it started working, once I'm deduplicated @glimmer/owner
packages, wondering, could we export appollo's
environment into appication? to avoid package duplication issue?
And it's partially solves problem I'm facing:
Given:
Problem:
@glimmer/ssr
does not support async logic insiderenderToString
functionSolution:
Request:
useQuery
inside "model" hook of router (without glimmer/ember application, because it will be attached later)Usecase example: