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

Failing to import type #291

Closed
andresespinosapc opened this issue Feb 24, 2019 · 2 comments
Closed

Failing to import type #291

andresespinosapc opened this issue Feb 24, 2019 · 2 comments

Comments

@andresespinosapc
Copy link

I have troubles trying to import a schema generated by postgraphile.

Attempt 1
I first tried importing a specific type like this: # import ProdAttrsConnection from './generated/postgraphile.graphql'

After writing the import line, I get this error with different types: Unknown type "ProductToAttrsOrderBy". The types that throw the error are not even dependencies of the one I imported, so I think it is a schema validation error. In the case of the error I mentioned, ProductToAttrsOrderBy is an enum and it is declared in the schema.

Attempt 2
Then I tried importing the whole schema like this: # import * from ./generated/postgraphile.graphql

In this case, I don't get an error by just writing the import line, but when I use any imported type I get this error with multiple types: Interface field Node.nodeId expected but ProdItemAttr does not provide it.

Here are the types corresponding to the error I mentioned:

interface Node {
  nodeId: ID!
}

type ProdItemAttr implements Node {
  nodeId: ID!
  # ...otherStuff
}
@jjangga0214
Copy link

For Attempt 2, there's already an issue, #315

@ardatan
Copy link
Owner

ardatan commented Mar 17, 2020

I think that issue is fixed in v1.0.0! Feel free to open a new one if it still persists.

@ardatan ardatan closed this as completed Mar 17, 2020
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

3 participants