Skip to content

Federated modeling? #138

@jdacoello

Description

@jdacoello

What is a feasible and recommended way for enabling a federated modeling?

This means, being able to re use sub graphs that might be hosted in different places.
GraphQL supports federation. However, in this project, we use the modeling language for a different purpose than the API itself. So, instead of federating the API operation, we want to federate the modeling. Ideally, different teams should be able to model and maintain their domain model, while others could decide to re use that schema in a bigger use case.

Image

Some options could be:

  • Importing a sub graph from other repository by copying its content to the working repository and adding pointers to the reference
  • Using git sub modules to check in the schemas that want to be reused
  • Other?

In any case, questions like the following arise:

  • Can I import only a portion of the reference schema? e.g., importing just an object type, or some fields of an object? There might be cases where the reference schema is quite big already.
  • Can I use GraphQL editors nicely when the references are located outside my repository?

One example of where federated modeling can be helpful is the Vehicle Data Model that can consist of several multiple sub domains. One of those sub domains can be, for example, imported from the VSS project.

Image

Other sub domains might include personal data, charging data, infrastructure, etc. If a modding repo is reusing sub graphs from other places, how can this be better realised with positive practical benefits?

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions