Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dt 6111 Update OTP2 information to Digitransit.fi #260

Merged
merged 66 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
09b7b78
Update example urls to v2
HenrikSundell Feb 29, 2024
5332ce7
Update route ids in example
HenrikSundell Mar 6, 2024
472ad44
Update bike rental api example querries
HenrikSundell Mar 13, 2024
60c69c4
Update url queryparameters for updated api queries
HenrikSundell Mar 14, 2024
2cdad49
Add info about planConnection
HenrikSundell May 16, 2024
cb02120
Update information about Interfaces
HenrikSundell Jul 25, 2024
c9fbb89
Add waltti-alt and varely urls
HenrikSundell Jul 25, 2024
25d259f
Fix rental bicycle query
HenrikSundell Jul 26, 2024
15e6abe
Fix personal bicycle query
HenrikSundell Jul 26, 2024
4cbb514
Update realtime documentation
HenrikSundell Aug 29, 2024
7d77e90
Update bicycle documentation
HenrikSundell Aug 29, 2024
28601fc
Update disruption documentation
HenrikSundell Sep 4, 2024
b9db3bd
Update documentation about itinerary planning
HenrikSundell Sep 4, 2024
7fb38a5
Remove advanced examples page and move relvant info to itinerary plan…
HenrikSundell Sep 4, 2024
86fb898
Update background map version
HenrikSundell Sep 4, 2024
44a8a84
Update background map version
HenrikSundell Sep 4, 2024
5e3e1e3
Add missing routing urls
HenrikSundell Sep 19, 2024
5fd4ce0
Update points of interest API documentation
HenrikSundell Sep 24, 2024
837f0ce
Update OTP url structure
HenrikSundell Oct 2, 2024
16a220c
Update local OTP url structures
HenrikSundell Oct 2, 2024
b8b82be
Update list of feeds with vehicle positions
optionsome Nov 2, 2024
bd8b80d
Write documentation about new canceled trips query
optionsome Nov 2, 2024
56ed2c3
Remove routing-api preview
optionsome Nov 2, 2024
5cfc546
Update real-time information documentation
optionsome Nov 2, 2024
300ed19
Update routing api index
optionsome Nov 2, 2024
eebe189
Move the fuzzyTrip documentation to HFP docs
optionsome Nov 2, 2024
17425ab
Update graphql index
optionsome Nov 2, 2024
c62858c
Update bicycling doc to contain info about cars and e-scooters as well
optionsome Nov 4, 2024
e2d25c2
Fix typo
optionsome Nov 4, 2024
b504362
Add page for translations
optionsome Nov 4, 2024
5365237
Add missing steps
optionsome Nov 4, 2024
61c8596
Update disruption info
optionsome Nov 4, 2024
599aaa1
Update page order
optionsome Nov 4, 2024
4e662ac
Update itinerary planning
optionsome Nov 4, 2024
c744031
Small adjustment
optionsome Nov 4, 2024
89fb886
Update map documentation
optionsome Nov 4, 2024
33f5dab
Update realtime page description
optionsome Nov 4, 2024
9e224dd
Remove references to old cancelled trip times query
optionsome Nov 4, 2024
dc142db
Update some random pages
optionsome Nov 4, 2024
079fd27
Update routing-api architecture page and move schema documentation un…
optionsome Nov 7, 2024
32aff6b
Fix some broken github links
optionsome Nov 7, 2024
5305f4a
Remove a couple of pages we don't want to maintain
optionsome Nov 7, 2024
26b3bd4
Update map architecture doc
optionsome Nov 7, 2024
c23c837
Remove legacy piwik usage
optionsome Nov 8, 2024
ed85dd6
Update SEO description
optionsome Nov 8, 2024
ec184c8
Fix typo
optionsome Nov 8, 2024
340915f
Update list of deployments
optionsome Nov 8, 2024
756a284
Change title for links and couple of link updates
optionsome Nov 8, 2024
a424db7
Update routing-api diagram and link to data building page from routin…
optionsome Nov 8, 2024
8338b0a
Add missing period
optionsome Nov 8, 2024
257637b
Update map architecture diagram
optionsome Nov 8, 2024
619e9cd
Edit DockerInfo component to make sense without some props
optionsome Nov 8, 2024
516d9fa
Update ui service doc
optionsome Nov 8, 2024
6d32136
Specify docker tag
optionsome Nov 8, 2024
cb858a4
Merge branch 'master' into DT-6111
optionsome Nov 8, 2024
bdeb29c
Update routing data diagrams
optionsome Nov 9, 2024
5f1e846
Update routing-data doc
optionsome Nov 9, 2024
19363c5
Create own api page for routing data
optionsome Nov 9, 2024
7d6b4cc
Fix architecture link
optionsome Nov 9, 2024
4e7883a
Refactor and slightly update geocoding documentation
optionsome Nov 9, 2024
564314e
Adjust page titles
optionsome Nov 9, 2024
c6a9482
Reane services to user-interfaces
optionsome Nov 9, 2024
82cdb85
Remove xml format architecture images
optionsome Nov 11, 2024
86a5cac
Add 3rd party digitransit deployments
optionsome Nov 11, 2024
141d762
Fix spelling
optionsome Nov 11, 2024
f855ad9
Apply review suggestions
optionsome Nov 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/pages/en/developers/apis/1-routing-api/0-graphql/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: GraphQL
# replit:
# title: "Examples"
# note: "The examples below send a GraphQL query using HTTP POST to <code>https://api.digitransit.fi/routing/v1/routers/hsl/index/graphql</code>. This example query asks the server to find a stop with the ID <i>HSL:1040129</i> and return its name, latitude and longitude coordinates, and whether is is accessible by wheelchair.<br/><b>Note:</b> If the examples provided do not return expected results, the stop id may not be in use any more and you should try again with an existing id."
# note: "The examples below send a GraphQL query using HTTP POST to <code>https://api.digitransit.fi/routing/v2/hsl/gtfs/v1</code>. This example query asks the server to find a stop with the ID <i>HSL:1040129</i> and return its name, latitude and longitude coordinates, and whether is is accessible by wheelchair.<br/><b>Note:</b> If the examples provided do not return expected results, the stop id may not be in use any more and you should try again with an existing id."
# embeds:
# -
# title: "Content-Type: application/graphql"
Expand Down Expand Up @@ -76,11 +76,11 @@ Global IDs in the Routing API are defined by [Relay](https://facebook.github.io/

### Interfaces
optionsome marked this conversation as resolved.
Show resolved Hide resolved

GraphQL supports interfaces, which objects can implement by including fields required by the interface. Two interfaces used in the Routing API are **Node** (which has the field `id` used for global IDs) and **PlaceInterface**.
GraphQL supports interfaces, which objects can implement by including fields required by the interface.

If a query type returns an interface, [inline fragments](https://graphql.org/learn/queries/#inline-fragments) have to be used to access fields defined by the object implementing the interface.

For example, query type **nearest** returns a list of **PlaceInterfaces** and types **BikePark** and **Stop** implement **PlaceInterface**.<br/>
For example, query type **nearest** returns a list of **PlaceInterfaces** and types **VehicleParking** and **Stop** implement **PlaceInterface**.<br/>
The following query returns field `spacesAvailable` for bike parks and field `code` for stops.
```graphql
{
Expand All @@ -95,10 +95,10 @@ The following query returns field `spacesAvailable` for bike parks and field `co
gtfsId
code
}
...on BikePark {
...on VehicleParking {
vehicleParkingId
name
bikeParkId
spacesAvailable
bicyclePlaces
}
}
distance
Expand Down Expand Up @@ -158,11 +158,11 @@ If the request includes multiple queries with same type, they must be renamed us

```graphql
{
route1: route(id: "HSL:2550") {
route1: route(id: "HSL:1020") {
shortName
longName
}
route2: route(id: "HSL:2551") {
route2: route(id: "HSL:1009") {
shortName
longName
}
Expand Down
16 changes: 10 additions & 6 deletions src/pages/en/developers/apis/1-routing-api/1-graphiql/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ order: 20

### There are a few options for using GraphiQL:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The images in this file seem a bit outdated. You can take some new screenshots and replace the old ones and check if the instructions still follow the new look.


1. Using our hosted browser versions for the three available regions. The browser versions have the correct endpoints configured already.
1. Using our hosted browser versions for the five available regions. The browser versions have the correct endpoints configured already.
* [Helsinki region](https://api.digitransit.fi/graphiql/hsl)
* [Waltti regions](https://api.digitransit.fi/graphiql/waltti)
* [Waltti-Opas regions](https://api.digitransit.fi/graphiql/waltti-alt)
* [Seutu+ regions](https://api.digitransit.fi/graphiql/varely)
* [Entire Finland](https://api.digitransit.fi/graphiql/finland)
2. A browser extension like [ChromeiQL](https://chrome.google.com/webstore/detail/chromeiql/fkkiamalmpiidkljmicmjfbieiclmeij) (see regional endpoints below)
3. For Mac OSX you can use [the desktop GraphiQL app](https://github.com/skevy/graphiql-app) (see regional endpoints below)
Expand All @@ -28,11 +30,13 @@ All options work similarly and their UI looks more or less like this (ChromeiQL

1. If you are using the GraphiQL app or a browser extension, set the GraphQL Endpoint to one of the following:

| Region | Endpoint |
|-----------------|----------------------------------------------------------------------|
| Helsinki region | `https://api.digitransit.fi/routing/v1/routers/hsl/index/graphql` |
| Waltti regions | `https://api.digitransit.fi/routing/v1/routers/waltti/index/graphql` |
| Entire Finland | `https://api.digitransit.fi/routing/v1/routers/finland/index/graphql` |
| Region | Endpoint |
|---------------------|--------------------------------------------------------------------------|
| Helsinki region | `https://api.digitransit.fi/routing/v2/hsl/gtfs/v1` |
| Waltti regions | `https://api.digitransit.fi/routing/v2/waltti/gtfs/v1` |
| Waltti-Opas region | `https://api.digitransit.fi/routing/v2/waltti-alt/gtfs/v1` |
| Seutu+ region | `https://api.digitransit.fi/routing/v2/varely/gtfs/v1` |
| Entire Finland | `https://api.digitransit.fi/routing/v2/finland/gtfs/v1` |

2. Click [this link](https://api.digitransit.fi/graphiql/hsl?query=%7B%0A%20%20stop(id%3A%20%22HSL%3A1040129%22)%20%7B%0A%20%20%20%20name%0A%20%20%20%20lat%0A%20%20%20%20lon%0A%20%20%20%20wheelchairBoarding%0A%20%20%7D%0A%7D) to run the query below in GraphiQL.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ Basically real-time means prediction of arrival times. We know vehicle's planned
## How do I know when data is real-time?
Real-time estimates are enabled by default when making itinerary planning requests. Availability of real-time estimates is not guaranteed, but field `realTime` (*true* / *false*) in each leg of the itinerary will indicate whether that leg's arrival / departure time is using real-time or static timetables. When using real-time, it means that uncertainty for arrival time is less than for purely static timetable data.

Real-time estimates for itinerary planning can be turned off by using argument `ignoreRealtimeUpdates` of **plan** query. Setting this to true will only return times based on static timetables.
Real-time estimates for itinerary planning can be turned off by using arguments `preferences: {transit: {timetable: {excludeRealTimeUpdates: true}}}` of **planConnection** query. Setting this to true will only return times based on static timetables.

Departures that have been cancelled through a real-time feed can be included using the arguments `preferences: {transit: {timetable: {includeRealTimeCancelations: true}}}` of **planConnection**. This means that an itinerary can include a cancelled departure while some other alternative that contains no cancellations could be filtered out as the alternative containing a cancellation would normally be better.

For stop timetables and route timetables, real-time estimates are available from fields `realtimeArrival` and `realtimeDeparture`. Note that these fields will have the static arrival / departure time by default and field `realtime` indicates whether the values of those fields have been updated from a real-time source.

Expand Down
Loading