Closed anatol-sialitski closed 2 years ago
I have written my concerns about "site" ConttentPathType here
All graphql client libraries support schema transformation. So there is no need to complicate our API with trivial transformations
Is schema Transformation equivalent to data Transformation?
Yes:
Other use cases for a read function include:
- Transforming cached data to suit your client's needs, such as rounding floating-point values to the nearest integer
- Deriving local-only fields from one or more schema fields on the same object (such as deriving an age field from a birthDate field)
- Deriving local-only fields from one or more schema fields across multiple objects
Beautiful.
Maybe in this case we can get rid of the type
argument in the _path
field?
I'd keep some room for improvement, if we already have it. Just in case.
https://github.com/enonic/lib-guillotine/issues/192#issuecomment-983521723 Add the
site
value toContentPathType
.After that
ContentPathType
supports two options:siteRelative
returns the relative path without initial '/' i.e.my-content/path
site
returns same response but with initial '/' i.e./my-content/path