Closed GabrielInTheWorld closed 2 years ago
This is not a bug of the autoupdate service, but the result of your (buggy?) request.
You request the field:
meeting/1/reference_projector_id/current_projection_ids/content_object_id/list_of_speakers_id/speaker_ids
But you don't request the field:
meeting/1/reference_projector_id/current_projection_ids/content_object_id/speaker_ids
If projection/content_object_id
is an object that has the field list_of_speakers_id
, then list_of_speakers_id/speaker_ids
can be found by the autoupdate-service. But if the projection/content_object_id
does not have the field list_of_speakers_id
, then the autoupdate-service can not find the field list_of_speakers_id/speaker_ids
.
To fix this, one solution would be, to change the request and add all the fields below list_of_speakers_id
to projection/content_object_id
. I understand that this is ugly and not DRY. Another (also ugly) solution would be to add a field list_of_speakers/list_of_speakers_id
that always has the same content as list_of_speakers/id
.
GraphQL solves this problem with interfaces: https://www.apollographql.com/docs/apollo-server/schema/unions-interfaces/#interface-type
We could add interface-collections to the models.yml and replace all generic-relations with interface-relations. This could make the requests more readable. But it would not solve your current problem. If we would create a los-collection-interface
that requires a field list_of_speakers_id
, then all of these collections could be used. But the list_of_speaker
-collection does not have the field list_of_speaker_id
.
@GabrielInTheWorld can I close this?
If this is still a problem, then please reopen with an answer.
As superadmin, I sent this request:
In case a content-object is projected, I get the following result from the AU-service:
In case the LOS of the same content-object is projected, I get the following result from the AU-service:
As you can see, there is something missing. Why is this happening?