Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If I have 2 .graphql schemas that import each other: #27

Open
theodorDiaconu opened this issue Mar 10, 2018 · 3 comments
Open

If I have 2 .graphql schemas that import each other: #27

theodorDiaconu opened this issue Mar 10, 2018 · 3 comments

Comments

@theodorDiaconu
Copy link

theodorDiaconu commented Mar 10, 2018

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)
@thearabbit
Copy link

I have the same error.
Could you share your solve?

@thearabbit
Copy link

I try remove #import './User', It still work fine.
Don't understand???

@thearabbit
Copy link

+1 have any solve this problem???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants