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

Incompatible with GraphQL v15 & Typescript #2105

Open Lexicality opened 1 year ago

Lexicality commented 1 year ago

Issue workflow progress

Progress of the issue based on the Contributor Workflow


Describe the bug

Same as #1522 and #1195

node_modules/graphql-scalars/typings/scalars/iso-date/Time.d.ts:10:35 - error TS2315: Type 'GraphQLScalarType' is not generic.

10 export declare const GraphQLTime: GraphQLScalarType<Date, string>;
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To Reproduce Steps to reproduce the behavior:

Expected behavior

Typescript successfully builds

Environment:

Additional context

acomito commented 1 year ago

@Lexicality did you ever fix this?

What combo worked for you?

Lexicality commented 1 year ago

@Lexicality did you ever fix this?

What combo worked for you?

Nope! I simply gave up and used a variety of other libraries and my own code

mmmulani commented 10 months ago

seems like you need graphQL version 16: https://github.com/graphql/graphql-js/commit/4f21cdc1f1cbd5873735b8426f8aa8b2f8d5db8c

breaking change from graphql-scalars that takes advantage of it: https://github.com/Urigo/graphql-scalars/commit/0fb119aa21ef552ed00a65ea7ab813ff06473cc6

downgrading to graphql-scalars@1.21.3 fixes this

Lexicality commented 10 months ago

In that case it would be nice if the peer dependencies were updated to make that clearer.