Closed JustusFluegel closed 1 year ago
Latest commit: 2940182a11b414fa622466806a0fa1fb1424686c
The changes in this PR will be included in the next version bump.
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
Hi @JustusFluegel , thank you for creating the PR! It's looking good. I left a few minor comments.
Here's a few extra things to do to make it ready to be merged:
master
$ nx workspace-generator typescript-resolver-files-add-e2e-test esm-import
codegen.ts
with the new config option:
defineConfig({ emitLegacyCommonJSImports: false })
$ nx graphql-codegen typescript-resolver-files-e2e -c test-esm-import --verbose
yarn changeset
and follow the prompt. This can be a patchI think that looks good
â•â”€â”€â”€â”€â”¬â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â•®
│ # │ capture2 │
├────┼─────────────────────────────────────────────────┤
│ 0 │ ./../../types.generated.js │
│ 1 │ ./../../types.generated.js │
│ 2 │ graphql │
│ 3 │ ./types.generated.js │
│ 4 │ ./topic/resolvers/Mutation/topicCreate.js │
│ 5 │ ./topic/resolvers/Mutation/topicEdit.js │
│ 6 │ ./base/resolvers/PaginationResult.js │
│ 7 │ ./base/resolvers/PayloadError.js │
│ 8 │ ./user/resolvers/Profile.js │
│ 9 │ ./user/resolvers/Query/me.js │
│ 10 │ ./topic/resolvers/Query/topicById.js │
│ 11 │ ./topic/resolvers/Query/topicsCreatedByUser.js │
│ 12 │ ./user/resolvers/Query/userByAccountName.js │
│ 13 │ ./base/resolvers/SomeRandomScalar.js │
│ 14 │ ./user/resolvers/Subscription/profileChanges.js │
│ 15 │ ./topic/resolvers/Topic.js │
│ 16 │ ./topic/resolvers/TopicByIdPayload.js │
│ 17 │ ./topic/resolvers/TopicByIdResult.js │
│ 18 │ ./topic/resolvers/TopicCreatePayload.js │
│ 19 │ ./topic/resolvers/TopicCreateResult.js │
│ 20 │ ./topic/resolvers/TopicEditPayload.js │
│ 21 │ ./topic/resolvers/TopicEditResult.js │
│ 22 │ ./topic/resolvers/TopicsCreatedByUserPayload.js │
│ 23 │ ./topic/resolvers/TopicsCreatedByUserResult.js │
│ 24 │ ./user/resolvers/User.js │
│ 25 │ ./user/resolvers/UserPayload.js │
│ 26 │ ./user/resolvers/UserResult.js │
│ 27 │ graphql-scalars │
│ 28 │ ./../../../types.generated.js │
│ 29 │ ./../../../types.generated.js │
│ 30 │ ./../../../types.generated.js │
│ 31 │ ./../../../types.generated.js │
│ 32 │ ./../../types.generated.js │
│ 33 │ ./../../types.generated.js │
│ 34 │ ./../../types.generated.js │
│ 35 │ ./../../types.generated.js │
│ 36 │ ./../../types.generated.js │
│ 37 │ ./../../types.generated.js │
│ 38 │ ./../../types.generated.js │
│ 39 │ ./../../types.generated.js │
│ 40 │ ./../../types.generated.js │
│ 41 │ graphql │
│ 42 │ graphql │
│ 43 │ ./topic/topic.mappers │
│ 44 │ ./../../types.generated.js │
│ 45 │ ./../../../types.generated.js │
│ 46 │ ./../../../types.generated.js │
│ 47 │ ./../../../types.generated.js │
│ 48 │ ./../../types.generated.js │
│ 49 │ ./../../types.generated.js │
│ 50 │ ./../../types.generated.js │
│ 51 │ graphql-tag │
├────┼─────────────────────────────────────────────────┤
│ # │ capture2 │
╰────┴─────────────────────────────────────────────────╯
oops ./topic/topic.mappers isn't correct.
Searched for half an hour but couldn't find out where that is coming from. Any ideas?
oops ./topic/topic.mappers isn't correct.
Searched for half an hour but couldn't find out where that is coming from. Any ideas?
Ah I see, mappers use the typescript-resolvers
's mapper which can be set here
I think your link is incorrect, it just redirects me to my last message
sorry, should be done, should be ready for review if you have the time @eddeee888
Thanks @JustusFluegel! The implementation and e2e tests looks good!
There are some unit tests are failing here. Do you mind having a look?
I think we just need to add the flag in 🙂
You can run unit test by running this:
yarn nx test typescript-resolver-files
Hopefully this should be it. If that was it then thanks for your patience :) @eddeee888
Great stuff! Thank you @JustusFluegel !
Closes #65
Sorry that this took so long, had a lot popping up and then kinda forgot I created this issue.