meteor-graphql
meteor-graphql copied to clipboard
If I have 2 .graphql schemas that import each other:
trafficstars
This is a very common scenario:
// Comment.graphql
#import './User'
type Comment {
title: String!
isDone: Boolean!
createdAt: Date!
user: User
}
// User.graphql
#import './Comment'
type User {
_id: ID!
firstName: String!
lastName: String!
age: Int
comments: [Comment]
}
Fails with:
W20180310-07:05:55.673(2)? (STDERR) TypeError: Cannot read property 'filter' of undefined
W20180310-07:05:55.673(2)? (STDERR) at unique (/Users/theodor/Projects/graphql-live/.meteor/local/build/programs/server/app/app.js:30:19)
W20180310-07:05:55.673(2)? (STDERR) at Comment.graphql.js (/Users/theodor/Projects/graphql-live/.meteor/local/build/programs/server/app/app.js:43:44)
W20180310-07:05:55.673(2)? (STDERR) at fileEvaluate (packages/modules-runtime.js:343:9)
W20180310-07:05:55.674(2)? (STDERR) at require (packages/modules-runtime.js:238:16)
I have the same error. Could you share your solve?
I try remove #import './User', It still work fine.
Don't understand???
+1 have any solve this problem???