-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Assertion error with a query including inline fragments #1880
Comments
I found a hacking solution for this of adding some type which contains a field of an ID type like the below. type Hack {
id: ID
}
... The problem is that |
Thanks for the input here. We're currently going through old issues that appear to have gone stale (ie. not updated in about the last 3 months) because the volume of material in the issue tracker is becoming hard to manage. If this is still important to you please comment and we'll re-open this. Thanks once again! |
I am seeing this problem with the relay-compiler, although the query works in GraphiQL. We have a Union inside of a fragment that gives this same error (Expected undefined to be a GraphQL leaf type) however with no stack trace. Can this issue be reopened? @wincent (This was tested with relay and compiler on v1.4.1) export default createRefetchContainer(
ScheduleDetails,
graphql`
fragment ScheduleDetailsAssignments on ScheduleAssignment {
id
target {
... on Rotation {
id
name
}
}
}
`,
graphql`
query ScheduleDetailsQuery($id: String!) {
schedule(id: $id) {
assignments {
...ScheduleDetailsAssignments
}
}
}
`
) |
I'm experiencing the same issue:
I have no idea what this means. I'm just trying to query a union inside of an object:
|
Given
./foo.js
:and
./schema.graphql
:Then, run the following command.
relay-compiler --src . --schema schema.graphql
And, I got errors.
Is this a bug of the compiler or am I missing something?
The text was updated successfully, but these errors were encountered: