-
Notifications
You must be signed in to change notification settings - Fork 211
Parse callbacks from Open API and create subscriptions #311
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
Signed-off-by: Alan Cha <[email protected]> Signed-off-by: getlarge <[email protected]>
Signed-off-by: getlarge <[email protected]>
Signed-off-by: getlarge <[email protected]>
Signed-off-by: getlarge <[email protected]>
Signed-off-by: getlarge <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
60f6d12
to
379ab88
Compare
I had to rename the new API to Example API 7 as there already exists and 5 and a 6. Unfortunately, I am still having some issues with the test. I get the following error from Jest when I run the test in isolation:
Try running |
@Alan-Cha the code changes looks good ;) |
I merged your changes, and fixed the test for api7. The TCP server was not closed properly, i also changed jest config as it might be useful in the future to track those workers not closed properly. |
Signed-off-by: getlarge <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
a12cfff
to
f545336
Compare
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
I've created a new |
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
Signed-off-by: Alan Cha <[email protected]>
d887e06
to
3e5beb7
Compare
@Alan-Cha Good we're almost there ;) For the customResolvers in Subscription, i don't see where the conflicts could happen, could you explain please ? |
@getlarge Hey! Some tests were still failing after your changes but I managed to get them working again! I thought it may have to do with inconsistent package versions across the different testing environments so I played around with the configuration and it seemed to do the trick! My concern with |
@Alan-Cha I will try the tests on your branch so that you have some additional feedback for the 'trick'. Thanks for the explanation on the |
Signed-off-by: Alan Cha <[email protected]>
@getlarge Don't worry about the tests! In my opinion, we should have tried to keep package versions consistent in our Travis tests from the beginning. There are no more failing tests now so I think we should move on. I also could not replicate the failures that were showing up in Travis previously. I added the |
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.
Seems good to me
@@ -519,7 +517,8 @@ async function translateOpenAPIToGraphQL( | |||
}, 0) | |||
|
|||
/** | |||
* Organize created queries / mutations / subscriptions into viewer objects. | |||
* Organize authenticated Query, Mutation, and Subscriptions fields into | |||
* viewer objects. |
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 think that quite soon we will see the issue of the auth for Subscription, because for now i think it's a rather limited because it's based on HTTP security schemes that will only apply to Websocket eventually.
Usually for a subscription, the authentication takes place a connection time, from parameter set in the PubSub client instance. But then Pubsub instance like eventEmitter don't take auth parameter...
So those authViews could set the connection params, if it's possible ... As you can see it might require some thoughts and tests.
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.
Yes, I see! We should file an issue for this. I can get started on it and if you'd like to add anything, feel free to do so! But for this PR, I think we can go ahead :)
Signed-off-by: Alan Cha <[email protected]>
bf41365
to
f2fa8c2
Compare
I made some final changes generally centered around comments. Once the tests run, I will publish! |
Looks like the tests have finished running! It's finally in! Thank you so so so much again! I know it's taken a long time to get to this point but I'm happy we finally got here! This has been the biggest PR we've ever had so it is really an incredible achievement. It has been a pleasure working with you @getlarge 🥳🍾🎆 |
And it's out!!! |
Very nice !! I already updated some of my package.json ;) |
Related to #297