diff --git a/src/main/java/org/rutebanken/tiamat/rest/graphql/types/InfoSpotObjectTypeCreator.java b/src/main/java/org/rutebanken/tiamat/rest/graphql/types/InfoSpotObjectTypeCreator.java index 664f846d7..734d3337e 100644 --- a/src/main/java/org/rutebanken/tiamat/rest/graphql/types/InfoSpotObjectTypeCreator.java +++ b/src/main/java/org/rutebanken/tiamat/rest/graphql/types/InfoSpotObjectTypeCreator.java @@ -58,6 +58,10 @@ public class InfoSpotObjectTypeCreator { public static GraphQLObjectType posterObjectType = newObject() .name(OUTPUT_TYPE_POSTER) + .field(netexIdFieldDefinition) + .field(newFieldDefinition() + .name(VERSION) + .type(GraphQLString)) .field(newFieldDefinition() .name(LABEL) .type(GraphQLString)) diff --git a/src/test/java/org/rutebanken/tiamat/rest/graphql/GraphQLResourceInfoSpotIntegrationTest.java b/src/test/java/org/rutebanken/tiamat/rest/graphql/GraphQLResourceInfoSpotIntegrationTest.java index 0d4edc99c..11b4b404d 100644 --- a/src/test/java/org/rutebanken/tiamat/rest/graphql/GraphQLResourceInfoSpotIntegrationTest.java +++ b/src/test/java/org/rutebanken/tiamat/rest/graphql/GraphQLResourceInfoSpotIntegrationTest.java @@ -569,6 +569,7 @@ public void updatePosterWithoutChangingReferences() { ) { id poster { + version label posterSize lines @@ -587,6 +588,7 @@ public void updatePosterWithoutChangingReferences() { .body("id", equalTo(updatedInfoSpot.getNetexId())) .body("poster", hasSize(1)) .appendRootPath("poster[0]") + .body("version", equalTo(Long.toString(updatedPoster.getVersion() + 1))) .body("label", equalTo(updatedPoster.getLabel())) .body("posterSize", equalTo(updatedPoster.getPosterSize().value())) .body("lines", equalTo(newLines));