Accessing parent context two parents up #330
-
Hi, I have a question involving accessing a parent's parent context (two layers up) from within a datafetcher/dataloader. Suppose we have the following contrived example:
I understand that type C can access type B via a call to dfe.getSource(). Now, what is the standard practice of accessing parent A from type C (which is nested two layers below A)? Additionally is this sort of situation of needing to access two parent levels up an indication of faulty/poor schema design? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @SirMattCam, we have a guide about that! :-) https://netflix.github.io/dgs/advanced/context-passing/#no-showid-use-local-context |
Beta Was this translation helpful? Give feedback.
Hi @SirMattCam, we have a guide about that! :-)
https://netflix.github.io/dgs/advanced/context-passing/#no-showid-use-local-context