Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCreate a text query from the current DataFetchingEnvironment's field (and Document). #422
Comments
|
Yup - recently added See : #377 Its not released yet but 3.0 is coming soon-ish |
|
This use the new IDL support to "print the current field selection including sub felds" and that could be used to send it on to a proxy |
|
I've already been writing my own, in Kotlin. I can't upgrade from 2.3
because the breaking changes, in 2.4. :-( what happened to semver? ugh!!!!
;-) Plus, I can't wait as we've run into a total showstopper without it.
So, this will require 3.0, eh? Oh well. Thanks for the info. Didn't know if
this had been done somewhere else.
…On Wed, May 10, 2017 at 8:21 PM bbakerman ***@***.***> wrote:
Yup - recently added
See : #377 <#377>
Its not released yet but 3.0 is coming soon-ish
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#422 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYJk5tLnOz4pzhj___OFQuZb01psWpNks5r4lSAgaJpZM4NWvZ6>
.
|
|
It was not possible before to call FieldCollector via API. And then there was no IDL print support in 2.4 either to allow you to reverse engineer a parsed Document back into text format. These have been added in 3.0 plus a bunch of other goodies The future readme has more info |
|
Hah, I've had to resort to manual parsing of the original query, getting
the selection sets and location of the "sub query" from the DFE, a custom
client to pass the document to the DFE, and all that to find and parse out
all the fragments that go with the query. Heh. I'm going to like to see
3.0. Thanks for the info.
…On Wed, May 10, 2017 at 8:30 PM bbakerman ***@***.***> wrote:
It was not possible before to call FieldCollector via API. And then there
was no IDL print support in 2.4 either to allow you to reverse engineer a
parsed Document back into text format.
These have been added in 3.0 plus a bunch of other goodies
The future readme has more info
https://github.com/graphql-java/graphql-java/blob/master/src/test/groovy/graphql/schema/DataFetcherSelectionTest.groovy
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#422 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYJk8subXpL3SGXIokQtuQHKGaj3Jg8ks5r4laygaJpZM4NWvZ6>
.
|
|
Sorry, one last question... and you can close this... how stable is master? |
|
@acidbluebriggs master is not stable at all: it is the current development branch, so we can't promise anything. |
|
@acidbluebriggs : Sorry for re-opening, but maybe a git flow approach is better suited to having a stable version and a development version. |
|
@ieugen this issue is not about our workflow, so please open a new one if you have a question or recommendation how we can improve things. thanks! |
(Originally posted to the google group, but I saw a message about closing the group that it's not really used)
I have a graphql schema, where one (or more) of the nodes/types, is actually going to be a "proxy" to another graphql instance. The types that are exposed are defined by the secondary system and exposed in the public schema. What I would like to do is when I am in the node that needs to be proxied is to reconstruct a GQL query (String), but for only the field that I'm in, and all it's children. In the DataFetchingEnvironment I know what field I am currently in. If I use the Parser I can parse the the original query and get a Document object and get all other relevant info. I "simply" want to take the current field, and all it's variables and fragments used in that field, and construct a new query. Then I can simply invoke that query via a GraphQL client to the other system and return the value from that call.
Does this make sense? Is there any such mechanism? Any pointers on the best way to approach this?