Skip to content

Commit

Permalink
Add bikeStation.state to graphQL interface
Browse files Browse the repository at this point in the history
  • Loading branch information
vesameskanen committed Mar 28, 2018
1 parent 900f086 commit b8cc71f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1823,6 +1823,11 @@ public IndexGraphQLSchema(GraphIndex index) {
.type(Scalars.GraphQLInt)
.dataFetcher(environment -> ((BikeRentalStation) environment.getSource()).spacesAvailable)
.build())
.field(GraphQLFieldDefinition.newFieldDefinition()
.name("state")
.type(Scalars.GraphQLString)
.dataFetcher(environment -> ((BikeRentalStation) environment.getSource()).state)
.build())
.field(GraphQLFieldDefinition.newFieldDefinition()
.name("realtime")
.type(Scalars.GraphQLBoolean)
Expand Down

0 comments on commit b8cc71f

Please sign in to comment.