The GraphQL Endpoint that we provide ( is compatible with any GraphiQL implementation that can pass an apikey header. Switch between the JavaScript and the cURL docs using the tabs.Find the countries table under Tables and Views in the sidebar.Let's view the documentation for a countries table which we created in our database. Supabase generates documentation in the Dashboard which updates as you make database changes. NEVER use this key in a browser.Īccessing the docs in the Dashboard # REST API a service_role key, which should only be used on a server.an anon key, which is safe to be used in a browser context.GraphQL: Both of these routes require the anon key to be passed through an apikey header.The REST API and the GraphQL API are both accessible through this URL: Find your API URL, anon, and service_role keys on this page.Go to the Settings page in the Dashboard. Your API is secured behind an API gateway which requires an API Key for every request. This creates a corresponding route todos which can accept GET, POST, PATCH, & DELETE requests.Įvery Supabase project has a unique API URL. Creating API Routes #ĪPI routes are automatically created when you create Postgres Tables, Views, or Functions.ĪPI route by creating a table called todos to store tasks. After you have added tables or functions to your database, you can use the APIs provided. Getting started #Īll APIs are auto-created from Database tables. Go to your project's Replication section to get started. You can manage your Realtime API simply by managing Postgres publications. Realtime leverages PostgreSQL's built-in logical replication. You can use this to listen to database changes over websockets. Supabase provides a Realtime API using Realtime. GraphQL in Supabase works through pg_graphql, an open source PostgreSQL extension for GraphQL. It is only available on self-hosted setups and Supabase projects created after 28th March 2022. GraphQL is in Beta, and may have breaking changes.
0 Comments
Leave a Reply. |