Feature Request: Allow overriding endpoint for HTTP resolver
Hello,
I'm working on an AppSync API which needs to talk to 3d party REST API.
The REST API URI has a following schema: <subdomain>.<hostname>/api/<method>
<subdomain> will depend on AppSync query/mutation input parameters.
Templates logic will be absolutely identitcal for all datasources.
So in current configuration, one would need either:
- create one datasource per REST API, one query/mutation & template per one datasource and FE needs to be aware which query/mutation to call.
or
- create one datasource per REST API, one query/mutation with bunch of pipeline resolver functions chained together with only one function being executed and the rest of them being skipped every time mutation/query is invoked.
Would be ideal if we can override endpoint similar to how it's currently done with DynamoDB batch get/put items templates where datasource table is ignored in favor of the table specified on the template. This was endpoint can be parametrized and decided during resolver execution.
Thank you for the input. Yes, indeed, the endpoint in the data source is currently static and can only be suffixed with a resource path. and not prefixed like you suggested. I will take your feature request to the team such that it is prioritized accordingly.