-
-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Description
Given the following schema, with a recursive document array, we get a stack overflow within the lib/fieldsConverter.js file.
code:
const Schema = new mongoose.Schema({
sometype: String
});
Schema.add({ recursiveType: [Schema] });
error:
.../node_modules/graphql-compose-mongoose/lib/fieldsConverter.js:149
var typeComposer = new _graphqlCompose.TypeComposer(_typeStorage2.default.getOrSet(typeName, new _graphql.GraphQLObjectType({
^
RangeError: Maximum call stack size exceeded
at convertModelToGraphQL (.../node_modules/graphql-compose-mongoose/lib/fieldsConverter.js:149:108)
at documentArrayToGraphQL (.../node_modules/graphql-compose-mongoose/lib/fieldsConverter.js:346:22)
at convertFieldToGraphQL (.../node_modules/graphql-compose-mongoose/lib/fieldsConverter.js:218:14)
at .../node_modules/graphql-compose-mongoose/lib/fieldsConverter.js:162:13
at Array.forEach (native)
at convertModelToGraphQL (.../node_modules/graphql-compose-mongoose/lib/fieldsConverter.js:159:39)
Metadata
Metadata
Assignees
Labels
No labels