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

List all templates (MVP) #2

Merged
merged 1 commit into from
Nov 12, 2023
Merged

Conversation

bartolomej
Copy link
Member

@bartolomej bartolomej commented Nov 11, 2023

Modify an existing /v1/templates endpoint to retrieve all templates instead of throwing an error, if name query parameter isn't provided.

This is technically a breaking change, so if we'd wanna merge this to the main repo, we'd need to move this logic to v2 endpoints added here: onflow#28

This isn't an ideal solution for a few reasons:

  • this same endpoint now returns either a list of templates, a single template, or an empty value (if using the name query param)
    • it could be a more flexible approach to let it only return a list of resources. In that way, this could be a general purpouse search endpoint, possibly supporting multiple query params and always returning a list of search results.
  • always returning all snapshots in the database, may not be a scalable solution long term
    • it should be fine for now, as there are only a couple hundred templates available (when counting the seeded ones only)

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.

1 participant