Open vasilich6107 opened 4 years ago
I am having this same issue.
Although for me, the fragment fails to build parse whether I have another fragment inside of the interface or not.
Both of these produce the same output:
fragment TextMessage on Text {
id
body
audit {
createdBy {
entity {
... on User {
...UserGql
}
}
}
}
}
fragment TextMessage on Text {
id
body
audit {
createdBy {
entity {
... on User {
id
firstName
lastName
}
}
}
}
}
This is the very last bug that is keeping us from using Artemis for our project. All the other issues have been resolved in these last few beta builds. Great work guys!
Hi. Try to change your query in the next way and try again.
fragment TextMessage on Text {
id
body
audit {
createdBy {
entity {
...UserGql
}
}
}
}
Hi. Try to change your query in the next way and try again.
fragment TextMessage on Text { id body audit { createdBy { entity { ...UserGql } } } }
@vasilich6107 Hello.
When I try to build with the above code, I correctly get this error:
Exception: Field id was not found in GraphQL type Actor.
Make sure your query is correct and your schema is updated.
In the schema there are multiple possible interfaces in that entity, so although this error is pretty vague, it makes sense for the build to error out.
Hmmm, I faced the same issue(
@vasilich6107 Were you able to find a work-around for this by any chance?
@m-Skolnick could you attach your schema and full query?
@vasilich6107 I wish I could, but I can't share our schema. However, I would be happy to test and report back the results if that would be helpful.
Share only the core part and rename the fields))) So I can experiment with solution
I'm not sure if this will be helpful, but here it is. It's just an interface that an object conforms to.
interface hasDisplayName {
"""A string used to display the player"""
displayName: String!
}
type User implements hasDisplayName {
"""A string used to display the displayName"""
displayName: String!
firstName: String!
lastName:String!
}
Full Schema and full query please
Is there any progress or workaround?
In case of using
it generates case statement that refers to not existent class
Just put this code in test file