-
Notifications
You must be signed in to change notification settings - Fork 184
DSL implementation of fragments #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #235 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 16 16
Lines 1139 1214 +75
=========================================
+ Hits 1139 1214 +75
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read through and it looks solid to me. Working on setting up a local env to play around with it a bit -- I've not yet done any contrib work on this repo. Thank you for your time and your quick response!
Plus one to what Chad said! We really appreciate your quick response and time on this PR! |
Hi @Cito, thanks for this PR. I have some remarks:
|
Hi @leszekhanusz.
Sorry, I must leave it to you or others to work out the details due to lack of time. I just wanted to provide a rough idea how this can be implemented. |
Ok, no worries, I'll propose something. |
0ae1a7b
to
d505962
Compare
I also would be interested in helping if the work isn't all done at this point |
Checking in to avoid duplicate efforts. I'm setting up my local env right now and going to read over the code in d505962 plus try and get a basic inline fragment to run + run the tests + evaluate the above comment against the commit. |
@chadfurman I am currently looking at how we could also support normal fragments into this PR. That's when I realized that the
So I decided to split it into DSLSelectable and DSLSelector. Next I am going to introduce the |
Not a problem! Ping me if you want help on anything -- this or another ticket. For now, I'll switch tasks Thank you for your effort and time :) fwiw: I have my local env setup and all dev deps on the right version now w/ tests and You have a very solid project here. Great work. |
Thanks! If you want something to do, you could maybe check the issue #125, diving into the Appsync protocol and creating another transport AWSAppsyncTransport which inherits WebsocketsTransport. |
@Cito I tried to combine normal and inline fragments in a single class but they are really different beasts, with normal fragments which need a name and can have variables. So now we need to know when we use a fragment as an argument in a |
But as far as I see, fragments with vars were experimental only (not part of the spec) and have now been deprecated in Graphql.js (and hence in GraphQL-core as well). |
Interesting... But the main problem remains and it feels cleaner to me to keep the classes separate. |
LGTM, it's definitely cleaner and allows more control over the generated query. |
Good! I'll add some documentation and merge this PR next weekend. |
@leszekhanusz Any updates on this ? |
This is my suggestion for #198