how does environment propagation work? if I have a...
# development
s
how does environment propagation work? if I have a:
Copy code
Get(Result, {request: Request, environment_name: EnvironmentName})
and then a:
Copy code
@rule
async def get_result(request: Request) -> Result:
    sub_request = request.do_something()
    return await Get(Result, SubRequest, sub_request)
does the 2nd
Get
run in the environment requested by the enclosing
Get
? or does each
Get
need to specify an env name when applicable?
âś… 1
cc @witty-crayon-22786 - Eric gave me a heads-up that you were actively redesigning the machinery here
w
does the 2nd
Get
run in the environment requested by the enclosing
Get
?
this. environments propagate down through the graph in places where a consumer needs them.
🙏 1
intermediate rules in the graph don’t need to know that they are present
s
perfect, thank you!
w
the one exception is that `@union`s are API boundaries: so `@union`s declare that the type will be present: and if a
@union
doesn’t declare that a type is present, it won’t be.
at any other
Get
callsite, anything that is in scope may end up used by consumers