Replies: 1 comment
-
I understand the problem space intimately - we have a stitching library we use in Atlassian that does a lot of this and more https://github.com/atlassian-labs/nadel
I dont think this is common enough that a DFE gets turned into a downstream query via DFE methods. However the idea that a certain field (and its sub selection and arguments) needs to be forwarded its not crazy. We have a currently internal class in graphql-java called This represents a queried field at runtime - eg a executable field that has been normalised into its runtime parts. Its still internal API because its brand new and a fair bit exploratory in some ways. That said the work in Nadel has show its valuable. One of the things we do in Nadel is create down stream queries from SO I don't have an easy answer for you right now in public API terms. You can get to this ENF tree today via But I guess what I am saying is that this idea of creating downstream queries from specific fields is not a crazy one and we have some of the code to help with it albeit not in public API yet. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there graphql-java,
Firstly, I want to say thank-you for this package, it's been incredibly helpful. There is some functionality which I think is either lacking or has not been needed so far. My use case is as follows:
We have a Graphql application which has multiple micro-services underneath it. One of these services is a GQL CMS which we dynamically add the schema for using instrumentation. In the GQL wiring, my goal is to take the DFE and in the service layer, convert this DFE into a stringified GraphQL query. That is, we use the top level field existing in the DFE and have an output which looks like:
This would need to support variables, arguments etc.
I have achieved something with some string manipulation which works for my use case (but is brittle) however I was wondering whether this would be a common enough pattern to warrant having a method on the DFE which would do this in one line?
Beta Was this translation helpful? Give feedback.
All reactions