-
Notifications
You must be signed in to change notification settings - Fork 2k
apollo-gateway export types #3371
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
@wareczek: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
Hi @trevor-scheer, please make it happen :) |
Hey @wareczek, thank you for submitting a PR! I'm not opposed to exporting these types, but as these functions are still experimental, I'm erring on the side of not (for now). My primary justification for this is that TS can infer these types automatically for typical use cases. If you (or any other 👍'ers) would like to demonstrate a case where these types are needed, I'll consider the addition! |
So be consequent. Callback |
One of the side-effects of a strongly-typed language is that the corresponding auto-completion results in users using features which they (often, in my experience) don't realize are experimental or subject to change. It's entirely possible that the prefix of the method name itself will make that clear, but I'm curious if it would hurt/help to also prefix the types with a similar prefix (e.g. Thoughts, anyone? (Not saying we'll need to exercise this, but luckily, since TypeScript uses structural typing, even if a type is renamed later on it will still work just fine by implementors of the previous type, so long as the shape remains the same.) |
Hmm, test failures do not seem to be spurious, but do not seem to be related to this PR? 🤔 |
@wareczek, let's go ahead and export these types with the So I'm not ambiguous, I'll list them:
If you don't mind adding those prefixes, I'd be happy to merge this! Also a changelog entry would be greatly appreciated 😄 |
@abernix a re-run did pass the failing Node6 tests for me, so I'll chalk it up to spurious unless you saw something I didn't. |
Thank you @wareczek! 🎉 |
* Export gateway types related to experimental observability and control hooks. * Prefix type names with `Experimental_` Apollo-Orig-Commit-AS: apollographql/apollo-server@4d91f0c
No description provided.