You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The change was that the ... on folder was pulled up one level.
A common use case is to have different queries for different schemas. With this change, it would be very easy to create a fragment for each schema and use them in the node query. Here is an example:
As you can see, this leads to a nice and clean main query, and a fragment for each schema. Also this allows for schema fragments to query properties that are not fields, which is currently not possible.
Backend Implementation
We could have a common interface for Nodes which includes all common fields (uuid, path, creator, etc.)
For each schema we then create an implementation of that interface with the additional fields property.
API Implementation
Simply changing this would cause a breaking change. I see these ways to solve this:
Just let it be a breaking change. This is maybe acceptable for Mesh 1.0
Instead of breaking the existing API, add new types for the API (ex. NodeInterface, FolderNode, VehicleNode, etc.) and allow them to be queried in addition to the old types. Maybe we can deprecate the old API and later remove it.
Make the new API available through another configuration (mesh.yml, GET-Parameter, different URL)
The text was updated successfully, but these errors were encountered:
Description
Currently, the type for different schemas in GraphQL is differentiated in fields. So to query fields of a node, the query has to look like this:
I recommend changing the GraphQL types, so that the query looks like this instead:
The change was that the
... on folder
was pulled up one level.A common use case is to have different queries for different schemas. With this change, it would be very easy to create a fragment for each schema and use them in the node query. Here is an example:
As you can see, this leads to a nice and clean main query, and a fragment for each schema. Also this allows for schema fragments to query properties that are not fields, which is currently not possible.
Backend Implementation
We could have a common interface for Nodes which includes all common fields (uuid, path, creator, etc.)
For each schema we then create an implementation of that interface with the additional
fields
property.API Implementation
Simply changing this would cause a breaking change. I see these ways to solve this:
The text was updated successfully, but these errors were encountered: