-
Notifications
You must be signed in to change notification settings - Fork 345
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
Allow configure mode
default + support all transforms on all sources
#1930
Comments
Some quick comments. Actually extend is not meant to be used with GraphQL sources, it has been introduced purely to offer a way to do schema extensions to bare schemas. So the only transforms to introduce wrap to are cache and snapshot, and it would be trivial to implement this mode, since they are actually agnostic of data source, since they operate on the response and do not care about the source schema at all. On another note, "bare" mode is not available in many more transforms: encapsulate, federation, mock, naming-conventions, and prefix. As about this point
It does sound nice, but probably difficult to implement. Might need some thinking. |
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Part 1:
As of right now
wrap
is default mode for transforms. If abare
mode is supposed to be used it needs to be configured for each transform individually.We propose adding the ability to override this default:
Part 2:
As of right now not all transforms can be used with
graphql
sources due to not supportingwrap
mode. When applying a bare transform on graphql source there currently is no error thrown the transform simply doesn't get applied. It took us a day or so to figure out what went wrong. While this could be mitigated by throwing an error, not being able to apply all transform to graphql source adds complexity for users to understand and reduces the supported scenarios for graphql mesh.We propose:
This reduces the potential for miss configuration as well as simplify the messaging:
wrap
andbare
withbare
being more performantbare
mode can't be used on graphql sources, any transform on graphql sources will always usewrap
mode no matter the configurationRelated issues: #1891 #1928
The text was updated successfully, but these errors were encountered: