Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Fix prettier changes

dannykng9b6f0ce32902
diff --git a/apps/docs/pages/guides/functions/best-practices.mdx b/apps/docs/pages/guides/functions/best-practices.mdx
deleted file mode 100644
index 99f58fed04d..00000000000
--- a/apps/docs/pages/guides/functions/best-practices.mdx
+++ /dev/null
@@ -1,64 +0,0 @@
-import Layout from '~/layouts/DefaultGuideLayout'
-
-export const meta = {
- id: 'functions-best-practices',
- title: 'Edge Functions Best Practices',
- description: 'Globally distributed TypeScript functions.',
-}
-
-## Database Functions vs Edge Functions
-
-For data-intensive operations we recommend using [Database Functions](/docs/guides/database/functions), which are executed within your database
-and can be called remotely using the [REST and GraphQL API](/docs/guides/database/api).
-
-For use-cases which require low-latency we recommend [Edge Functions](/docs/guides/functions), which are globally-distributed and can be written in TypeScript.
-
-## Organizing your Edge Functions
-
-We recommend developing “fat functions”. This means that you should develop few large functions, rather than many small functions. One common pattern when developing Functions is that you need to share code between two or more Functions. To do this, you can store any shared code in a folder prefixed with an underscore (`_`). We recommend this folder structure:
-
-```bash
-└── supabase
- ├── functions
- │ ├── _shared
- │ | ├── supabaseAdmin.ts # Supabase client with SERVICE_ROLE key
- │ │ └── supabaseClient.ts # Supabase client with ANON key
- │ ├── function-one # use hyphens to name functions
- │ │ └── index.ts
- │ └── function-two
- │ └── index.ts
- ├── migrations
- └── config.toml
-```
-
-## Naming Edge Functions
-
-We recommend using hyphens to name functions because hyphens are the most URL-friendly of all the naming conventions (snake_case, camelCase, PascalCase).
-
-## CORS (Cross-Origin Resource Sharing)
-
-We recommend adding a check to handle [CORS Preflight](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) requests in your edge function to be able to invoke the function from browsers.
-
-See the [example on GitHub](https://github.com/supabase/supabase/blob/master/examples/edge-functions/supabase/functions/browser-with-cors/index.ts).
-
-```ts
-export const corsHeaders = {
- 'Access-Control-Allow-Origin': '*',
- 'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey',
-}
-
-serve(async (req) => {
- if (req.method === 'OPTIONS') {
- return new Response('ok', { headers: corsHeaders })
- }
- ...
-})
-```
-
-## Using HTTP Methods
-
-Edge Functions supports `GET`, `POST`, `PUT`, `PATCH`, `DELETE`, and `OPTIONS`. A function can be designed to perform different actions based on a request's HTTP method. See the [example on building a RESTful service](https://github.com/supabase/supabase/tree/master/examples/edge-functions/supabase/functions/restful-tasks) to learn how to handle different HTTP methods in your function.
-
-export const Page = ({ children }) => <Layout meta={meta} children={children} />
-
-export default Page
diff --git a/apps/www/_blog/2021-12-03-pg-graphql.mdx b/apps/www/_blog/2021-12-03-pg-graphql.mdx
index e723614a063..6926bb0a429 100644
--- a/apps/www/_blog/2021-12-03-pg-graphql.mdx
+++ b/apps/www/_blog/2021-12-03-pg-graphql.mdx
@@ -170,17 +170,17 @@ We're opting to expose the function over HTTP through PostgREST but you could al
When it comes to APIs, performance counts. Here are some figures from [Apache Bench](https://www.tutorialspoint.com/apache_bench/apache_bench_quick_guide.htm) showing 2,205 requests/second on a 4 core machine with 16 GB of memory.
```markdown hideCopy
-Concurrency Level: 8
-Time taken for tests: 3.628 seconds
-Complete requests: 8000
-Failed requests: 0
-Total transferred: 1768000 bytes
-Total body sent: 1928000
-HTML transferred: 368000 bytes
-Requests per second: 2205.21 [#/sec] (mean)
-Time per request: 3.628 [ms] (mean)
-Time per request: 0.453 [ms] (mean, across all concurrent requests)
-Transfer rate: 475.93 [Kbytes/sec] received
+Concurrency Level: 8
+Time taken for tests: 3.628 seconds
+Complete requests: 8000
+Failed requests: 0
+Total transferred: 1768000 bytes
+Total body sent: 1928000
+HTML transferred: 368000 bytes
+Requests per second: 2205.21 [#/sec] (mean)
+Time per request: 3.628 [ms] (mean)
+Time per request: 0.453 [ms] (mean, across all concurrent requests)
+Transfer rate: 475.93 [Kbytes/sec] received
```
Full steps to reproduce this output are available in [the docs](https://supabase.github.io/pg_graphql).
diff --git a/studio/components/to-be-cleaned/Docs/Pages/Tables/Introduction.tsx b/studio/components/to-be-cleaned/Docs/Pages/Tables/Introduction.tsx
index e36671ae8ed..8ef26409da3 100644
--- a/studio/components/to-be-cleaned/Docs/Pages/Tables/Introduction.tsx
+++ b/studio/components/to-be-cleaned/Docs/Pages/Tables/Introduction.tsx
@@ -83,10 +83,8 @@ const Introduction: FC<Props> = ({ selectedLang }) => {
</p>
<p>
You can generate types from your database either through the{' '}
- <Link href="https://supabase.com/docs/guides/database/api/generating-types">
- Supabase CLI
- </Link>
- , or by downloading the types file via the button on the right and importing it in your
+ <Link href="https://supabase.com/docs/guides/database/api/generating-types">Supabase CLI</Link>,
+ or by downloading the types file via the button on the right and importing it in your
application within <code>src/index.ts</code>.
</p>
</article>