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

Current GraphQL exporter needs refactoring #431

Open
jdacoello opened this issue Nov 19, 2024 · 0 comments
Open

Current GraphQL exporter needs refactoring #431

jdacoello opened this issue Nov 19, 2024 · 0 comments

Comments

@jdacoello
Copy link

Argument 1 - Current GraphQL structure is of little use

The current GraphQL exporter creates a new type for every vss element (branch, attribute, sensor, actuator). For example:

type Vehicle {
  vehicleIdentification: Vehicle_VehicleIdentification
  ...
}

type Vehicle_VehicleIdentification {
  ...
}
...

type Vehicle_VehicleIdentification_Brand {
  value: String
  timestamp: String
}

However, this method is not effectively using the expressiveness that the GraphQL schema language offers. Ideally, a type should be the feature of interest to which multiple fields are linked. In this example, a better option would be:

type Vehicle_VehicleIdentification {
  brand: String
  ...
}

Argument 2 - VSS modeling can be entirely done in GraphQL Schema Language

The idea of evolving VSS from a tree to a graph has been already discussed a few times in COVESA. As a result, an evolution plan has been suggested and documented here.

To that end, the first step is to improve this exporter. So, a PR to solve this particular issue is on the making and its progress can be consulted in the feature set documentation or directly in the developing branch.

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