Hello
I have 2 subgraphs: Progression & Course
In the Progression subgraph I have this:
type UserProgression @key(fields: "_id") {
_id: ID
videoId: ID
videoInfos: JSONObject @external
update(progress: Int, lastPosition: Int, timeSpent: Int): Boolean @requires(fields: "videoInfos")
}
And in the Course subgraph I have this:
extend type UserProgression @key(fields: "_id") {
_id: ID @external
videoId: ID @external
videoInfos: JSONObject @requires(fields: "videoId")
}
What I was expecting it to do is that when i call update, it calls the resolveReference videoInfos which will call the resolveReference videoId.
But i get the error : “INTERNAL_SERVER_ERROR: Cannot create a selection set from an empty path”
When i try to call just videoInfos it works, and when i call update after removing the @requires from videoInfos it also works. I guess the problem here is that a required field is calling another required field.
Is there any solution for that ?