We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Problem: Trying to create a separate plugin file which returns a plugin that registers fastifySupabase. Looks like the following:
import { SupabaseClientOptions } from '@supabase/supabase-js' import fastifySupabase from '@psteinroe/fastify-supabase' import fp from 'fastify-plugin' type FastifySupabasePluginOpts = { url: string serviceKey: string anonKey: string options?: SupabaseClientOptions<'public'> } export default fp<FastifySupabasePluginOpts>(async (fastify, opts) => { fastify.register(fastifySupabase, { url: opts.url, anonKey: opts.anonKey, serviceKey: opts.serviceKey, // you can pass any `SupabaseClientOptions` options: opts.options }) })
A potential solution: Would help if the type FastifySupabasePluginOpts was also exported so that we can use it like
import fastifySupabase, { FastifySupabasePluginOpts } from '@psteinroe/fastify-supabase'
The text was updated successfully, but these errors were encountered:
I just opened a pull request that addresses this: #38
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Problem:
Trying to create a separate plugin file which returns a plugin that registers fastifySupabase. Looks like the following:
A potential solution:
Would help if the type FastifySupabasePluginOpts was also exported so that we can use it like
The text was updated successfully, but these errors were encountered: