You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just recently added the typescript-resolvers plugin to my codegen config, and while it does what I need, it seems to also add my custom scalars to the ResolversTypes.
The issue is that it seems to add an extra ['output'] property to these scalars. For example; I end up getting an error:
Property 'output' does not exist on type 'X'
Example:
// generated.ts/** All built-in and custom scalars, mapped to their actual values */exporttypeScalars={ID: string;String: string;Boolean: boolean;Int: number;Float: number;DataURL: any;Date: any;DateTime: any;Email: any;JSON: any;PhoneNumber: any;};// ..../** Mapping between all available schema types and the resolvers types */exporttypeResolversTypes={Boolean: ResolverTypeWrapper<Scalars['Boolean']['output']>;ID: ResolverTypeWrapper<Scalars['ID']['output']>;Float: ResolverTypeWrapper<Scalars['Float']['output']>;Int: ResolverTypeWrapper<Scalars['Int']['output']>;PhoneNumber: ResolverTypeWrapper<Scalars['PhoneNumber']['output']>;// <-- this one weirdly doesn't throw an error?String: ResolverTypeWrapper<Scalars['String']['output']>;/** Mapping between all available schema types and the resolvers parents */exporttypeResolversParentTypes={Boolean: Scalars['Boolean']['output'];DataURL: Scalars['DataURL']['output'];// <-- this one also doesn't throw an errorDate: Scalars['Date']['output'];// <-- this one also doesn't throw an errorDateTime: Scalars['DateTime']['output'];// <-- this one also doesn't throw an errorFloat: Scalars['Float']['output'];ID: Scalars['ID']['output'];Int: Scalars['Int']['output'];String: Scalars['String']['output'];
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I just recently added the
typescript-resolvers
plugin to my codegen config, and while it does what I need, it seems to also add my custom scalars to theResolversTypes
.The issue is that it seems to add an extra
['output']
property to these scalars. For example; I end up getting an error:Example:
Am I missing something from my config?
Beta Was this translation helpful? Give feedback.
All reactions