Skip to content

Invalid GraphQL query results in error when planning trip #1131

Open
@brodyFlannigan

Description

@brodyFlannigan

Hi!

I'm encountering an issue with trip planning using OTP-RR.

I'm running OTP 2.4.0 and the latest version of OTP-RR (commit e004d3b)

The issue I'm having is that it seems that when planning a trip, the query sent to the OTP server is invalid.

Specifically, GraphQL doesn't like being asked for numberOfTransfers and returns the following error in it's response.

{
    "errors": [
        {
            "message": "Validation error (FieldUndefined@[plan/itineraries/numberOfTransfers]) : Field 'numberOfTransfers' in type 'Itinerary' is undefined",
            "locations": [
                {
                    "line": 227,
                    "column": 7
                }
            ],
            "extensions": {
                "classification": "ValidationError"
            }
        }
    ]
}

Using the GraphQL debugging UI (GraphiQL) on the OTP server, I've determined that removing line 227 from the GraphQL query results in a trip plan being returned.

Additionally, when this error is returned by the OTP server, no indication is provided to the user that something went wrong. They're just presented with a blank list of trip plan results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions