You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type InnerObject {
propertyOne: Int!
propertyTwo: Int!
}
type OuterObject {
propertyOne: Int!
propertyTwo: [[InnerObject!]!]!
}
And I have ran codegen for this and created the mocks. When using the mocks in tests, everything compiles fine. However when i set the value of "propertyTwo" two in mocks, and then convert it to a (non-mock) graphQL object using .from(Mock) and then try to access "propertyTwo" in code, it crashes with the error fatalError("\(Self.self) expected data for entity.")
Version
1.0.5
Steps to reproduce the behavior
Use a schema with a property of type:
[[SomeObject!]!]!
Generate mocks / code from it.
Initialize an object for the containing type use .from(Mock<>)
try to access the property of double nested array type.
Notices the crash
Logs
No response
Anything else?
Here's what the call stack looks like.
The text was updated successfully, but these errors were encountered:
Thanks for the bug report @scottasoutherland. I can replicate the crash, not sure what's going wrong yet though. I'll get back to you once I've dug into it a bit more.
Any updates or plans to address this soon? We are having to disable some of tests in our migration to Apollo 1.0.6 since there doesn't seem to be an easy work-around.
This is on our list, but we've got a lot of high priority work on at the moment. I can't make a promise of when we will get to this one. If you are interested in digging into the problem and putting up a PR, we'd love to take a look at it. Otherwise, I will try my best to find some time to look at this by the end of the month!
Summary
I have a schema that looks something like this:
And I have ran codegen for this and created the mocks. When using the mocks in tests, everything compiles fine. However when i set the value of "propertyTwo" two in mocks, and then convert it to a (non-mock) graphQL object using .from(Mock) and then try to access "propertyTwo" in code, it crashes with the error
fatalError("\(Self.self) expected data for entity.")
Version
1.0.5
Steps to reproduce the behavior
.from(Mock<>)
Logs
No response
Anything else?
Here's what the call stack looks like.
The text was updated successfully, but these errors were encountered: