Skip to content

feat: add functions support #13

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

Merged
merged 5 commits into from
Mar 18, 2025

Conversation

leo-gall
Copy link
Contributor

What kind of change does this PR introduce?

Feature

What is the current behavior?

Currently, function invocation is not supported.

What is the new behavior?

This PR adds a new method to the MockSupabaseHttpClient: you can now call the registerFunctionsResponse function, which registers a new function. As function parameters, you can specify a name and a FunctionResponse object. This function can now be called, e.g. using Supabase.instance.client.functions.invoke

Copy link
Member

@dshukertjr dshukertjr left a comment

Choose a reason for hiding this comment

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

I love this PR! I did leave a comment, but overall very excited about it!

@leo-gall leo-gall requested a review from dshukertjr February 22, 2025 12:57
@leo-gall
Copy link
Contributor Author

leo-gall commented Feb 27, 2025

I think it is done so far, except of the documentation. Any feedback?

@dshukertjr
Copy link
Member

@leo-gall So sorry for taking so long to come back to this one. It appears that there is an analysis issue, but could you take a look?

@leo-gall
Copy link
Contributor Author

leo-gall commented Mar 5, 2025

@leo-gall So sorry for taking so long to come back to this one. It appears that there is an analysis issue, but could you take a look?

They were failing because there was a syntax error caused by the merge conflict resolution a few days ago. I've also added documentation btw.

@leo-gall
Copy link
Contributor Author

leo-gall commented Mar 8, 2025

Do you have any feedback? Is anything missing or do you have any recommendations for the API?

Copy link
Member

@dshukertjr dshukertjr left a comment

Choose a reason for hiding this comment

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

Looks great, and sorry for taking time on this one!

@dshukertjr dshukertjr merged commit fc38cff into supabase-community:main Mar 18, 2025
1 check passed
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.

2 participants