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
DO NOT MERGE YET - Feature/restify docs tests #179
DO NOT MERGE YET - Feature/restify docs tests #179
Conversation
@joelgriffith: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
What's different about it? I've heard of people using |
I initially didn't think this would work OOB as the naming suggested it's for This achieves a certain level of integration against restify by documenting it and adding tests. To be fair: I haven't explored the internals of Bascially: instead of folks searching for how to use this with restify, |
Sure, I'm just wondering if we could do the same by just saying |
Sure, there's only two differences in implementation at this point
I'm going to continue playing with the implementation locally to see if there's improvements or other considerations to fix, but wanted to get an MVP for this review to get discussion going |
Apologies on thrashing the pushes, found a few issues when consuming this from an outside project |
@@ -1,5 +1,5 @@ | |||
import * as restify from 'restify'; |
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.
Doing this makes sure that the interfaces are properly exports as opposed to referencing them directly, so tests a few things in one :)
hi @joelgriffith i think that's a good idea thanks for the contributation! also, @helfer, can we postpone merging until monorepo is merged? |
Sure, I've marked the PR accordingly. |
I don't mind acting as custodian for this once monorepo is in place. And I definitely echo the sentiment that this is pretty repetitive, and hopefully having clear distinction now makes potential breaking changes easier in the future. Lastly, I'll be at the GraphQL summit coming up, and would love say my hellos with this fine team. Thanks! |
Awesome! Excited to see you there! |
@stubailo I generally agree with @joelgriffith. Express & Restify are very similar but they are effectively different. For now, apolloExpress uses a subset of express features common to restify but let's say in the future, we need to use a super fancy express feature, not available in restify under the same API, then, we're not good! |
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.
This is pretty cool! Not having those tests was not a great feeling. Thanks for tackling the issue, you did a great job!
|
||
describe('integration:Restify', () => { | ||
testSuite(createApp); | ||
}); |
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.
Any help needed to add more tests ? For now, you only ensure the server is not crashing (which is a good start!).
and yet, IMO, we need to avoid code duplication as much as we can, |
@DxCx Well I understand that. If we go that way however, we definitely need more tests. |
i havn't spoken about testing but implementation itself, IMO, testing is always welcome :) |
@DxCx We completely agree 😉 , I understand that you don't want to avoid duplicating only the implementation! Just saying in this case, we need to ensure that the express implementation stays compatible with restify. And if this implementation were to break, we should then duplicate the code! |
I can easily add an alias in the export manifest to use the express integration, but just export an additional interface. I think that seems to be the best thing to do at this juncture since there's some concern about duplication. |
@joelgriffith You will definitely need to export a new interface. I think we found a good compromise with this though! Thanks for contributing anyway, I can't wait to see what you'll do! |
Sounds good, I'll hold off then atm since I'm fighting the TS type system when trying to alias... |
Going to re-implement this in monorepo land as I'm having some rought ts conflicts after having migrated. |
We still need to support Node 12 for gateway 0.x.
We still need to support Node 12 for gateway 0.x.
We still need to support Node 12 for gateway 0.x.
Hey folks, fine project here. This is my first PR, as well as my first TS undertaking, so take that into consideration :)
This introduces a new interface for
restify
, that almost is a copy/pasta of the express integration. I've also taken the liberty of adding some dependencies for this so that things compile and tests run.Let me know changes you'd like, and whatever else I should take into consideration... and thanks!