Skip to content
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

[Improvement] Multi-Source Support for REST scenario. #1753

Closed
rohkhann opened this issue Sep 27, 2023 · 1 comment · Fixed by #2169
Closed

[Improvement] Multi-Source Support for REST scenario. #1753

rohkhann opened this issue Sep 27, 2023 · 1 comment · Fixed by #2169
Milestone

Comments

@rohkhann
Copy link
Contributor

with RFC: #1638, we have added support for multiple datasources for graphql scenario. Pr:#1709. This issue tracks adding support for multiple datasources for REST scenario.

@seantleonard
Copy link
Contributor

Make sure to consider @kliszaq 's points raised in #1761 with regards to how RestService maps requests to additional datasources.

@seantleonard seantleonard added this to the 1.1rc milestone May 7, 2024
@seantleonard seantleonard linked a pull request May 7, 2024 that will close this issue
seantleonard pushed a commit that referenced this issue May 8, 2024
## Why make this change?
This change introduces REST support for multiple DB Scenario.
Issue: #1753
## What is this change?
1. Instead of using the default db name to dispatch queries, we are
using the db name based on entity and then dispatching queries and
mutations.

## How was this tested?
1. Existing unit tests should cover backward compatibility scenarios of
all single db rest support.
2. Existing unit tests cover the flow once the query is dispatched to
the queryEngine/query executor. We need to add the tests for the
integration scenario for other calls in rest.
3. Added test for rest scenario dispatch routing.

Integration test:
1. Two db's one has publishers entity and one has books:
Get publishers

![image](https://github.com/Azure/data-api-builder/assets/124841904/8f1fd2d6-50f0-410a-b096-ad946434ba94)

Get books

![image](https://github.com/Azure/data-api-builder/assets/124841904/3c0e680c-4c30-46dd-8bdc-575c673ecdaf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants