mickhansen / graphql-sequelize

GraphQL & Relay for MySQL & Postgres via Sequelize
MIT License
1.9k stars 172 forks source link

CITEXT throws an issue in the latest version #705

Closed kevflynn closed 2 years ago

kevflynn commented 3 years ago

I'm assuming it's because I don't have something globally installed - but I'm getting the

Right-hand side of 'instanceof' is not an object

Error for CITEXT. Do I need to install or update a sep. package?

mickhansen commented 3 years ago

What's the stack trace for that error?

kevflynn commented 3 years ago

TypeError: Right-hand side of 'instanceof' is not an object at Object.toGraphQL (/Users/flynn/Documents/labs/communityroot/crootapi/node_modules/graphql-sequelize/lib/typeMapper.js:85:331) at /Users/flynn/Documents/labs/communityroot/crootapi/node_modules/graphql-sequelize/lib/defaultArgs.js:24:27 at Array.forEach () at module.exports (/Users/flynn/Documents/labs/communityroot/crootapi/node_modules/graphql-sequelize/lib/defaultArgs.js:21:10) at fields (/Users/flynn/Documents/labs/communityroot/crootapi/src/graphql/schema/index.js:39:20) at resolveThunk (/Users/flynn/Documents/labs/communityroot/crootapi/node_modules/graphql/type/definition.js:438:40) at defineFieldMap (/Users/flynn/Documents/labs/communityroot/crootapi/node_modules/graphql/type/definition.js:625:18) at GraphQLObjectType.getFields (/Users/flynn/Documents/labs/communityroot/crootapi/node_modules/graphql/type/definition.js:579:27) at typeMapReducer (/Users/flynn/Documents/labs/communityroot/crootapi/node_modules/graphql/type/schema.js:280:78) at Array.reduce () at new GraphQLSchema (/Users/flynn/Documents/labs/communityroot/crootapi/node_modules/graphql/type/schema.js:145:28) at Object. (/Users/flynn/Documents/labs/communityroot/crootapi/src/graphql/schema/index.js:245:16) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Module._compile (/Users/flynn/Documents/labs/communityroot/crootapi/node_modules/pirates/lib/index.js:99:24) at Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Object.newLoader [as .js] (/Users/flynn/Documents/labs/communityroot/crootapi/node_modules/pirates/lib/index.js:104:7) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:94:18) at Object. (/Users/flynn/Documents/labs/communityroot/crootapi/src/server.js:8:1) at Module._compile (node:internal/modules/cjs/loader:1101:14) [nodemon] app crashed - waiting for file changes before starting...

kevflynn commented 3 years ago

If i remove that last || sequelizeType instanceof CITEXT

it works fine

mickhansen commented 3 years ago

What version of Sequelize are you using?

mickhansen commented 3 years ago

CITEXT must be unavailable in some cases, the line should be ammended to (CITEXT !== undefined && sequelizeType instanceof CITEXT)

kevflynn commented 3 years ago
"sequelize": "^4.42.0",

yeah - looks like it was added in v5 of sequelize

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.