Urigo / graphql-scalars

A library of custom GraphQL Scalars for creating precise type-safe GraphQL schemas.
https://www.the-guild.dev/graphql/scalars
MIT License
1.88k stars 133 forks source link

GraphQLCuid is not compatible with cuid2 #2399

Open Natchii59 opened 4 months ago

Natchii59 commented 4 months ago

Issue workflow progress

Progress of the issue based on the Contributor Workflow


Describe the bug I use this package to create my cuids. But when I return this id in graphql with the GraphQLCuid scalar, it tells me that this cuid is not valid.

To Reproduce It's complicated to reproduce, because I have the impression that the error appears 1 in 4 times. But here is a cuid that GraphQLCuid finds invalid: dp71y53f6eykvl5g1393rmhl

Expected behavior I expected GraphQLCuid to not throw an error regarding my cuid.

Environment:

Additional context :x:

Natchii59 commented 4 months ago

I'm using the cuid2 package, because cuid package has security issues.