graphql.language.Field usage #4022
-
Hello! I have a couple of questions about the usage of
as a
I realize that maybe it's not a very common usage of the Thanks in advance 🙏 If the functionality is missing but you would consider it useful, I would be able to contribute |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The parser does NOT start from a syntax element of field but its can be tricked
The thing is Field and They are the AST syntax elements. For example read https://www.graphql-java.com/blog/deep-dive-merged-fields
This is valid AST and will include two You need some other representation of a "field and its sub selection". With the https://github.com/atlassian-labs/nadel (our Atlassian federated query engine) we use You can mutate this structure and then "print" a sub document from this to form "sub operations" If you are just wanting to know "the simple runtime field subselection" then See https://www.graphql-java.com/blog/deep-dive-data-fetcher-results |
Beta Was this translation helpful? Give feedback.
graphql.language.Field
as its name suggests is the AST representation of graphql query text. And yes it can be parsed into a string with some tricksThe parser does NOT start from a syntax element of field but its can be tricked
parseField("f(arg : 1) { inner sub selection }")
for exampleThe thing is Field and
graphql.language.SelectionSet
is not really a represen…