Comments (8)
Hi! Do you have running MongoDB on your machine? It's needed for E2E tests.
from graffiti-mongoose.
I'm experiencing the same. I can see it creating the test entities in mongo, but it throws this error:
e2e
get schema
singular query
--> this is where it goes wrong { message: 'Cast to ObjectId failed for value "undefined" at path "_id"',
locations: [ { line: 2, column: 11 } ] }
query is correct, i.e. _id is not undefined: {
user(_id: "55daca1ed5f6e76f45f37b52") {
_id
name
age
mother {
_id
name
}
friends {
_id
name
}
objectIds
}
}
For reference, the error occurs here: https://github.com/RisingStack/graffiti-mongoose/blob/master/src/e2e.spec.js#L85
P.S.: This might not be the same issue. Some tests are passing for me.
from graffiti-mongoose.
Just tested a singular endpoint in my app and I'm getting the same.
{
"@risingstack/graffiti": "^1.0.2",
"@risingstack/graffiti-mongoose": "^1.6.1",
"mongoose": "^4.1.3",
}
from graffiti-mongoose.
Sorry for the spam.
This could be down to this issue: Automattic/mongoose#2646
from graffiti-mongoose.
@hardchor @fcmatteo do you still think this is an issue with graffiti-mongoose
? I'm quiet surprised, we are also running the e2e tests on TravisCI. I don't see any issue with them: https://travis-ci.org/RisingStack/graffiti-mongoose/builds
from graffiti-mongoose.
I'm sorry, I have been busy with other stuff, but yes, I have MongoDB running. In fact, the db 'graffiti-test' was created with the 'users' collection, which is empty.
from graffiti-mongoose.
Had mongoose 4.1.3.
Force-installed 4.0.6 - still broken.
Reset, reinstalled - works.
What on earth?
from graffiti-mongoose.
I force-installed [email protected] and it worked.
from graffiti-mongoose.
Related Issues (20)
- Implicit dependency on babel-polyfill HOT 9
- Cannot set currently-valued fields to null in update mutation HOT 2
- How to make a custom field: id? HOT 10
- "TypeError: Cannot read property 'forEach' of undefined" when embedded object field is a reference HOT 6
- Custom query thunk - accepts only InputObject types HOT 3
- Question on customQueries HOT 7
- Example project doesnt work with [email protected] and [email protected] HOT 1
- Async hook support HOT 2
- How to use Express Middleware for Authentication/Authorization. HOT 4
- Get specific field validation error?
- How to mutate nested Schema? HOT 3
- What is different between id and _id HOT 1
- UNMET PEER DEPENDENCY HOT 1
- Maintainer Volunteer Thread HOT 1
- Mongoose ObjectId and GraphQL id is not the same. How to link them? HOT 5
- It is possible to add some description to schema and to be reflected in the docs?
- Does graffiti-mongoose works with react-apollo ? HOT 2
- Custom mutations?
- Custom queries/mutations HOT 1
- setTypeFields bug
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graffiti-mongoose.