Skip to content

error TS1009: Trailing comma not allowed - client/modules/sclar.ts #1482

Description

@P4sca1

When using custom scalars, the generated GraphQL client contains a type error.

shared/graphql/generated/client/modules/scalar.ts:615:46 - error TS1009: Trailing comma not allowed.

615 | $$Utilities.Codec.GetDecoded<Void['codec']>,

The generated code looks like this:

/**
* Runtime registry of custom scalar codecs.
*
* Maps scalar type names to their codec implementations for encoding/decoding.
*/

      export const $registry = {
        map: {
CountryCode: CustomScalars.CountryCode,
Cron: CustomScalars.Cron,
DateTime: CustomScalars.DateTime,
Decimal: CustomScalars.Decimal,
EmailAddress: CustomScalars.EmailAddress,
Euro: CustomScalars.Euro,
FileMode: CustomScalars.FileMode,
FilePermissionPriority: CustomScalars.FilePermissionPriority,
GameServerPermission: CustomScalars.GameServerPermission,
Glob: CustomScalars.Glob,
IPv4Address: CustomScalars.IPv4Address,
JsonObject: CustomScalars.JsonObject,
Port: CustomScalars.Port,
Url: CustomScalars.Url,
Void: CustomScalars.Void
},
      } as $Registry


/**
* Type-level registry of custom scalars.
*
* Provides type information about custom scalars for the type system.
*/
export type $Registry = $$Utilities.Schema.Scalars.Registry<
          {
CountryCode: CountryCode,
Cron: Cron,
DateTime: DateTime,
Decimal: Decimal,
EmailAddress: EmailAddress,
Euro: Euro,
FileMode: FileMode,
FilePermissionPriority: FilePermissionPriority,
GameServerPermission: GameServerPermission,
Glob: Glob,
IPv4Address: IPv4Address,
JsonObject: JsonObject,
Port: Port,
Url: Url,
Void: Void
},
          $$Utilities.Codec.GetEncoded<CountryCode['codec']>
| $$Utilities.Codec.GetEncoded<Cron['codec']>
| $$Utilities.Codec.GetEncoded<DateTime['codec']>
| $$Utilities.Codec.GetEncoded<Decimal['codec']>
| $$Utilities.Codec.GetEncoded<EmailAddress['codec']>
| $$Utilities.Codec.GetEncoded<Euro['codec']>
| $$Utilities.Codec.GetEncoded<FileMode['codec']>
| $$Utilities.Codec.GetEncoded<FilePermissionPriority['codec']>
| $$Utilities.Codec.GetEncoded<GameServerPermission['codec']>
| $$Utilities.Codec.GetEncoded<Glob['codec']>
| $$Utilities.Codec.GetEncoded<IPv4Address['codec']>
| $$Utilities.Codec.GetEncoded<JsonObject['codec']>
| $$Utilities.Codec.GetEncoded<Port['codec']>
| $$Utilities.Codec.GetEncoded<Url['codec']>
| $$Utilities.Codec.GetEncoded<Void['codec']>,
          $$Utilities.Codec.GetDecoded<CountryCode['codec']>
| $$Utilities.Codec.GetDecoded<Cron['codec']>
| $$Utilities.Codec.GetDecoded<DateTime['codec']>
| $$Utilities.Codec.GetDecoded<Decimal['codec']>
| $$Utilities.Codec.GetDecoded<EmailAddress['codec']>
| $$Utilities.Codec.GetDecoded<Euro['codec']>
| $$Utilities.Codec.GetDecoded<FileMode['codec']>
| $$Utilities.Codec.GetDecoded<FilePermissionPriority['codec']>
| $$Utilities.Codec.GetDecoded<GameServerPermission['codec']>
| $$Utilities.Codec.GetDecoded<Glob['codec']>
| $$Utilities.Codec.GetDecoded<IPv4Address['codec']>
| $$Utilities.Codec.GetDecoded<JsonObject['codec']>
| $$Utilities.Codec.GetDecoded<Port['codec']>
| $$Utilities.Codec.GetDecoded<Url['codec']>
| $$Utilities.Codec.GetDecoded<Void['codec']>, // This line causes the issue
        >

Graffle verison: 8.0.0-next.223

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions