-
-
Notifications
You must be signed in to change notification settings - Fork 818
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
Adding support for module import paths #4723
base: master
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: be558ca The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@tlivings is attempting to deploy a commit to the The Guild Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Any thoughts on this? |
@ardatan Was there any feedback or questions? |
@tlivings I was busy with some important tasks. I will take a look by the end of this week. |
I think we already support this case; |
I see. Would be nice if this was documented 🤣 Thanks! |
sorry for that @tlivings :/ |
d34fb65
to
b8bf584
Compare
🚨 IMPORTANT: Please do not create a Pull Request without creating an issue first.
Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request.
Description
This change adds support for
#import
statements to use paths to modules.Example:
A simplified form, assuming the module package
main
points at a schema could be:This is particularly useful for both published shared types and monorepos that wish to avoid relative paths between packages.
Related: #4721
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
See
import-schema.spec.ts
test: "require paths"Test Environment:
@graphql-tools/...
:Checklist:
Further comments
Because jest intercepts require statements, I added a path override to the module mapper to ensure the test is able to run.