Skip to content

Comments

Add formFactor filter for operators graphql query#226

Draft
hbruch wants to merge 1 commit intoentur:masterfrom
mfdz:operator-by-formfactor
Draft

Add formFactor filter for operators graphql query#226
hbruch wants to merge 1 commit intoentur:masterfrom
mfdz:operator-by-formfactor

Conversation

@hbruch
Copy link
Collaborator

@hbruch hbruch commented Aug 25, 2023

This PR adds formFactor as optional filter to the graphql operators query.

An operator matches a given formFactor, if any vehicle_type it rents has of the requested formFactors.

Note: this filter evaluates vehicle_types, not currently available vehicle_types.

This PR fixes #215.

@testower
Copy link
Collaborator

The vehicleTypes property of FeedProvider is intended as a way to hard code static vehicle type data from feedproviders.yml if the upstream data source does not provide it. It is not populated with actual data from upstream data sources.

@hbruch hbruch marked this pull request as draft August 25, 2023 17:43
@hbruch
Copy link
Collaborator Author

hbruch commented Aug 25, 2023

Oh, I see. Will explore, if GBFSFeedCache can be used, or do you have another suggestion?

@testower
Copy link
Collaborator

Yeah, you could of course iterate over all systems and fetch their vehicle_types.json from the cache, and aggregate the data from there, but it is a bit brute.

I do have some ideas on how this should be solved, but I need to flesh it out a bit with some drawing. I think it involves adding the concept of an Operator entity.

Are you available next week for a call and we can discuss it?

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

Successfully merging this pull request may close these issues.

FeatureRequest: Support filtering by formFactor

2 participants