होना चाहिए मैं graffiti
का उपयोग करके एक्सप्रेस और मोंगोज़ के साथ ग्राफ़क्यूएल रूट सेट अप करने का प्रयास कर रहा हूं।ग्राफ़क्यूएल - प्रकार आउटपुट प्रकार
हालांकि मैं निम्नलिखित त्रुटि मिलती है:
Error: myColl.myField field type must be Output Type but got: undefined.
at invariant (/Users/nha/.../node_modules/graphql/jsutils/invariant.js:20:11)
at /Users/nha/.../node_modules/graphql/type/definition.js:299:39
नेवला स्कीमा में, प्रकार है: type : Schema.Types.ObjectId
। क्या इसे किसी और चीज़ के लिए बदला जाना चाहिए?
मैं नोट करना चाहिए कि संस्करण हैं:
"@risingstack/graffiti": "^1.0.2"
"@risingstack/graffiti-mongoose": "^3.1.1"
"mongoose": "~3.6.20"
कोड जो त्रुटि फेंकता है क्या है? –