forked from opentripplanner/OpenTripPlanner
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #186 from ibi-group/upstream-merge-2023-10-09
Upstream merge 2023-10-09
- Loading branch information
Showing
297 changed files
with
2,303 additions
and
2,461 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# GTFS GraphQL API | ||
|
||
The GTFS GraphQL API is a general purpose API which was created for the Digitransit project and is | ||
used heavily by [digitransit-ui](https://github.com/HSLdevcom/digitransit-ui). | ||
|
||
[otp-react-redux](https://github.com/opentripplanner/otp-react-redux) has also migrated to this API in 2023. | ||
|
||
## URLs | ||
- GraphQL endpoint: [`http://localhost:8080/otp/routers/default/index/graphql`](http://localhost:8080/otp/routers/default/index/graphql) | ||
- HTML schema documentation: [https://docs.opentripplanner.org/api/dev-2.x/graphql-gtfs/](https://docs.opentripplanner.org/api/dev-2.x/graphql-gtfs/) | ||
- Built-in visual GraphQL client: [http://localhost:8080/graphiql](http://localhost:8080/graphiql) | ||
|
||
## Built-in API client | ||
|
||
A browser based GraphQL API client is available at [http://localhost:8080/graphiql](http://localhost:8080/graphiql) | ||
|
||
![GraphiQL](../images/graphiql.png) | ||
|
||
**`curl` example** | ||
|
||
A complete example that fetches the list of all stops from OTP is: | ||
|
||
``` | ||
curl --request POST \ | ||
--url http://localhost:8080/otp/routers/default/index/graphql \ | ||
--header 'Content-Type: application/json' \ | ||
--header 'OTPTimeout: 180000' \ | ||
--data '{"query":"query stops {\n stops {\n gtfsId\n name\n }\n}\n","operationName":"stops"}' | ||
``` | ||
## Configuration | ||
|
||
The API is enabled by default. | ||
|
||
If you want to disable it, do it in `otp-config.json`: | ||
|
||
```json | ||
// otp-config.json | ||
{ | ||
"otpFeatures" : { | ||
"GtfsGraphQlApi": false | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
mkdocs==1.5.2 | ||
mkdocs-material==9.1.17 | ||
mkdocs==1.5.3 | ||
mkdocs-material==9.4.2 | ||
mike@git+https://github.com/jimporter/mike.git@f0522f245e64687dd18384fbd86b721175711474 | ||
mkdocs-no-sitemap-plugin==0.0.1 |
Oops, something went wrong.