-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
feat(functions): Invoke function with custom query params #926
feat(functions): Invoke function with custom query params #926
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR and for adding tests for it as well! I just had one comment regarding the naming of the parameter, but other than that it looks great!
@@ -71,11 +71,13 @@ class FunctionsClient { | |||
String functionName, { | |||
Map<String, String>? headers, | |||
Map<String, dynamic>? body, | |||
Map<String, String>? queryParameters, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the Uri constructor documentation
A value in the map must be either null, a string, or an Iterable of strings. An iterable corresponds to multiple values for the same key, and an empty iterable or null corresponds to no value for the key.
So I think we could adapt the same type and use Map<String,dynamic>
instead of Map<String,String>
for the query parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that's a good point, I'm updating this part right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the amazing contribution 🎉
What kind of change does this PR introduce?
Adding query parameters support for edge functions.
Closes #924
Additional context
Largely inspired from supabase/supabase-swift#376.
cc @dshukertjr