decaporg / decaporg/decap-cms

graphql-compose building-schema error when upgrading to react 19 & gatsby ^5.17

Open
#7,693 0 comments 0 reactions 0 assignees View on GitHub
ssg: gatsby type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Describe the bug**

When using "gatsby-source-filesystem" (along with decap-cms-app, react 19 & gatsby ^5.17) I'm getting the following error:

```
ERROR UNKNOWN

Missing onError handler for invocation 'building-schema', error was 'Error: Cannot create as TypeComposer the following value:
GraphQLScalarType({ name: "Date", description: "A date string, such as 2007-12-03, compliant with the ISO 8601 standard for
representation of dates and times using the Gregorian calendar.", specifiedByURL: undefined, serialize: [function String], parseValue:
[function String], parseLiteral: [function parseLiteral], extensions: { }, astNode: undefined, extensionASTNodes: [] }).'. Stacktrace
was 'Error: Cannot create as TypeComposer the following value:
GraphQLScalarType({ name: "Date", description: "A date string, such as 2007-12-03, compliant with the ISO 8601 standard for
representation of dates and times using the Gregorian calendar.", specifiedByURL: undefined, serialize: [function String], parseValue:
[function String], parseLiteral: [function parseLiteral], extensions: { }, astNode: undefined, extensionASTNodes: [] }).
at SchemaComposer.createTempTC
(/Users/benoror/code/benoror/TylerVawserSite/node_modules/graphql-compose/lib/SchemaComposer.js:367:15)
at SchemaComposer.createTC (/Users/benoror/code/benoror/TylerVawserSite/node_modules/graphql-compose/lib/SchemaComposer.js:326:89)
at SchemaComposer.add (/Users/benoror/code/benoror/TylerVawserSite/node_modules/graphql-compose/lib/SchemaComposer.js:594:25)
at createSchemaComposer (/Users/benoror/code/benoror/TylerVawserSite/node_modules/gatsby/dist/schema/schema-composer.js:21:18)
at build (/Users/benoror/code/benoror/TylerVawserSite/node_modules/gatsby/dist/schema/index.js:153:26)
at async buildSchema (/Users/benoror/code/benoror/TylerVawserSite/node_modules/gatsby/dist/services/build-schema.js:19:3)'

⠸ building schema
```

Getting stuck at `building schema`

Fixed resolution to `"graphql": "16.0.0"` as proposed here: https://stackoverflow.com/a/76353832

Related: https://github.com/gatsbyjs/gatsby/issues/39180#issuecomment-3708849259

Contributor guide

Open the contributing guide

Research direction

Reproduce the Gatsby schema build with gatsby-source-filesystem, React 19, and the reported dependency versions. Start at graphql-compose/lib/SchemaComposer.js around createTempTC/createTC and Gatsby's schema-composer.js; done means the building-schema step completes without rejecting the Date scalar.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, javascript, react
Domain
backend-api-design, build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.