Implement requestless connectors using mappingOnly @connect attribute#9124
Implement requestless connectors using mappingOnly @connect attribute#9124andrewmcgivery wants to merge 7 commits intodevfrom
Conversation
✅ Docs preview has no changesThe preview was not built because there were no changes. Build ID: 4e9aa07837716ce6a74e9453 ✅ AI Style Review — No Changes DetectedNo MDX files were changed in this pull request. Review Log: View detailed log
|
|
@andrewmcgivery, please consider creating a changeset entry in |
benjamn
left a comment
There was a problem hiding this comment.
Why do we need mappingOnly: true? Why not just omit the http to indicate you don't want a request?
I imagine @lennyburdette still has useful context here.
My thought process was that we may want it to be explicit for two reasons... First, because I could imagine a future with other types of connectors that also don't use the http attribute. E.g. So it won't just be the absence of http, but potentially other attributes. Second, this way the user could never "accidentally" include or exclude the That all said, Lenny's original design did do what you're suggesting (no extra attribute, lack of |
|
There's a much better and more accurate way to determine if the developer needs Asking the developer to throw in If you're really attached to this idea, I would recommend running it by customers so you can be sure this is actually helpful and solves real problems! |
This PR updated
@connectto accept amappingOnlyproperty which can be used for a "requestless connector", meaning a connector that applies a mapping but does not send an http request.The
@connectdirective now must have one ofmappingOnlyorhttp, but not both. This is handled in validation code.This also works with nested mutations:
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
A lot of (if not most) features benefit from built-in observability and
debug-level logs. Please read this guidance on metrics best-practices. ↩Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩