Closed feychenie closed 1 month ago
Thanks @feychenie , I'll take a look
Hi @feychenie ,
Thanks for the issue report, I'm able to replicate and fix it. I've an alpha version that could fix this issue:
yarn add -D @eddeee888/gcg-typescript-resolver-files@pr320-run582-1
For posterity, any resolver overrides that are provided by the user will give full control to the user in terms of implementation and exports.
There are currently externalResolvers
(for non-scalars) and scalarsOverrides
(for scalars) options that allow users to do this 🙂
Describe the bug After upgrading from
0.9.2
to0.9.3
(and tested on0.9.4
as well), the lookup for an exported custom scalar ignores the custom export name after the#
in the file path.scalarsOverrides: { Date: { resolver: './base/resolvers/Date#DateResolver', type: 'string' }, }
behaves as if the path was actually./base/resolvers/Date#Date
,#DateResolver
is ignored.This was working perfectly fine before.
To Reproduce
Date
scalar resolver in aDate.ts
file, and export the resolver asexport const DateResolver
instead ofexport const Date
Date: { resolver: './Date#DateResolver', type: 'string' }
export cost Date
scalar scaffold has been added to the file.Expected behavior
Nothing should happen as the custom scalar is already exported
Versions
"@graphql-codegen/cli": "5.0.2"
,"@eddeee888/gcg-typescript-resolver-files": "0.9.3",