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

Allow to add any route #29

Merged
merged 1 commit into from
Aug 19, 2021
Merged

Allow to add any route #29

merged 1 commit into from
Aug 19, 2021

Conversation

andresmgot
Copy link
Collaborator

We want to list custom resources in the sql datasource (like regions for AWS plugins). Since these routes/resources are not generic, this PR adds the possibility to set any custom route. More context here.

Copy link
Collaborator

@sunker sunker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! One potential problem is that the custom routes could override the completion routes. The only solution that I can think of would be to mount each custom route under a predefined prefix path, like custom/regions. But that also makes the api a bit harder to understand for the user. Thoughts?

@andresmgot
Copy link
Collaborator Author

One potential problem is that the custom routes could override the completion routes

I have added a check for that: https://github.com/grafana/sqlds/pull/29/files#diff-651d914d00ae86a3bf860ac5084dbbfa633aa6c35294802ee7fdf0cc761cad4dR109-R111 WDYT?

Copy link
Collaborator

@sunker sunker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andresmgot andresmgot merged commit 3ff608c into main Aug 19, 2021
@sasklacz sasklacz deleted the routes branch January 9, 2023 13:53
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 this pull request may close these issues.

None yet

2 participants