Skip to content

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

@benoror

Description

@benoror

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: gatsbyjs/gatsby#39180 (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