-
Hey folks, I'll go straight to the point, I have raised 2 PRs (#1554 and #1624) to introduce I understand you're going to look into a long-term solution to split schema generation and execution in Mesh, and at that stage, you will probably also look into performing more transforms with "bare" mode by default, as mentioned here. In the meantime, "bare" mode can and should be added onto existing transforms as proposed with my PRs and I am keen to get this rolling. As a recap, these are top issues that I have with the default "wrap" approach (the list can probably be extended further):
For completeness, these are the potential restrictions for "bare" mode, as detailed in the proposed documentation:
As usual, thanks for the time you will want to dedicate to this. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
We aren't planning to make "bare" mode by default because we cannot assume that internal subschemas are returning the whole data not relying on selection set. Wrapping is the safest option for all cases so we keep wrapping is the default option but you can go with 'bare' mode on your own risk :) |
Beta Was this translation helpful? Give feedback.
-
All true, but mapSchema is used within the transformSchema step at startup not on every request.
also true, but to clarify, these do not trigger mapSchema calls, and only some result transforms require walking the result This would be O(n = nodes in result), but much of graphql is also O(that same n) so I don’t think it’s big o notation that is issue, just the cost itself. In terms of stitching, some of the simpler transformations might be able to be improved further to be “prebuilt” within the wrapping schema resolvers, so that might be another Avenue of development. I make the above comments only with regard to clarifying what’s going on with schema stitching, without really commenting on the right way forward for non Graphql end points... |
Beta Was this translation helpful? Give feedback.
-
PRs for bare mode have been merged and documentation has been introduced. I'm currently not planning to introduce "bare" mode on more transforms, but if you believe that more popular transforms should have this, or we get feature requests, I will be happy to look into that. |
Beta Was this translation helpful? Give feedback.
PRs for bare mode have been merged and documentation has been introduced.
Thanks for accepting my contributions and tolerating my opinionated view 😅
I'm currently not planning to introduce "bare" mode on more transforms, but if you believe that more popular transforms should have this, or we get feature requests, I will be happy to look into that.