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

Mismatch between docs and query response for "transportModes" #140

Open
mikael-epigram opened this issue Sep 25, 2023 · 0 comments
Open

Comments

@mikael-epigram
Copy link

mikael-epigram commented Sep 25, 2023

I highly doubt this is the exact right repo for this (more likely in the openjourneyplanner or just the underlying docs depending on your perspective), but in the docs in the sidebar in shamash one can read the following :

transportModes: [TransportModes]

The allowed modes for the transit part of the trip. Use an empty list to disallow transit for this search. If the element is not present or null, it will default to all transport modes.

If attempting the following query:

{
  trip(
    from: {
      name: "Bjerkealleen 5A, Skedsmo"
      coordinates: {
        latitude: 59.96050414081307
        longitude:11.040338686322317
      }
    }
    to: {
      place:"NSR:StopPlace:385"
      name:"Alna, Oslo"
    }
    numTripPatterns: 3
    dateTime: "2023-09-25T16:35:26.652807"
    walkSpeed: 1.3
    arriveBy: false
    modes: {
       transportModes: null
    }
  )

#### Requested fields
  {
    tripPatterns {
      expectedStartTime
      duration
      walkDistance
      legs {
        mode
        distance
        line {
          id
          publicCode
        }
      }
    }
  }
}

then i get the following response:

{
  "errors": [
    {
      "message": "Exception while fetching data (/trip) : Cannot invoke \"java.util.List.isEmpty()\" because \"transportModes\" is null",
      "locations": [
        {
          "line": 20,
          "column": 3
        }
      ],
      "path": [
        "trip"
      ],
      "extensions": {
        "classification": "DataFetchingException"
      }
    }
  ],
  "data": null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant