RisingStack / graffiti-mongoose

⚠️ DEVELOPMENT DISCONTINUED - Mongoose (MongoDB) adapter for graffiti (Node.js GraphQL ORM)
https://risingstack-graffiti.signup.team/
MIT License
382 stars 52 forks source link

setTypeFields bug #212

Open caizx666 opened 6 years ago

caizx666 commented 6 years ago

fix Error: Schema must contain unique named types but contains multiple types named

function setTypeFields(type, fields) { type._typeConfig.fields = function () { return fields; }; }

change to

function setTypeFields(type, fields) { type._fields = null; // for reset type._typeConfig.fields = function () { return fields; }; }