supabase / supabase Goto Github PK
View Code? Open in Web Editor NEWThe open source Firebase alternative.
Home Page: https://supabase.com
License: Apache License 2.0
The open source Firebase alternative.
Home Page: https://supabase.com
License: Apache License 2.0
Users should have the ability to change the Org Name after they have created it
I'm submitting a ...
[ *] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
Summary
examples in docs need updating to snippets that will actually return something
https://supabase.io/docs/library/get#order
the snippets and examples for
order
, single
, filter
, etc. won't return anything as they are, we should include a .select(*)
in the example so that the snippet can be copy/pasted as a working example, and users can understand the context, i.e. how they should be combined with a select()
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)
I'm submitting a ...
[x ] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
Summary
Hi there, just tried installing via docker with the following docker-compose file
version: '3'
services:
supabase:
image: supabase/supabase-dev:latest
ports:
- "8000:8000"
environment:
DB_HOST: db
DB_NAME: postgres
DB_USER: postgres
DB_PASSWORD: postgres
DB_PORT: 5432
DB_SCHEMA: public
depends_on:
- db
db:
image: postgres:12
ports:
- "5432:5432"
command:
- "postgres"
- "-c"
- "wal_level=logical"
when running docker-compose up -d
I get error ERROR: manifest for supabase/supabase-dev:latest not found: manifest unknown: manifest unknown
I can't seem to find a repository more related to docker image.
All the best
I'm submitting a ...
[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
Summary
The search box is showing results from our "includes". Here you can see "eq" and "CommonFilters":
But these are just sections which are supposed to be "included" into other pages
The solution is probably just moving these common "includes" out of the "docs" folder.
Caused by #28
I'm submitting a ...
[ ] question about how to use this project
Summary
Where can I access the Postgres connection URL to connect the Db with Metabase or PowerBI in order to analyze the data easily?
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)
I'm submitting a ...
[ ] bug report
[ ] feature request
[x] question about the decisions made in the repository
[ ] question about how to use this project
Summary
Hey guys
Just a question if the insert functionality is using prepared statements?
We were somehow picked up by Stackshare, so we should add the link to our footer in the "Community" section: https://stackshare.io/supabase
(While we're at it, we should add the Product Hunt link).
I'm submitting a ...
[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
Summary
PostgREST/postgrest#177
missing method for getSubscriptions(): https://supabase.io/docs/library/subscribe#getsubscriptions
See supabase/supabase/libraries/supabase-js/test/integration/testRealtime.js
The tests that test for specific eventType are currently failing
This issue is to track if the Netlify build cron job is working correctly, especially for the traction chart. It's scheduled daily at 0200 SGT, will close if the chart gets updated.
Dependabot couldn't find a package.json for this project.
Dependabot requires a package.json to evaluate your project's current JavaScript dependencies. It had expected to find one at the path: /libraries/supabase-js/package.json
.
If this isn't a JavaScript project, or if it is a library, you may wish to disable updates for it from within Dependabot.
I encountered a HTTP 521 error when trying to use a https://...
url in createClient
when developing on localhost, perhaps supabase-js could print a warning message to console if it notices that the source is 127.0.0.1 and suggest downgrading the url to http://
in this environment
Right now the dashboard is desktop-only (this is so that we can develop faster).
This issue is to track delivery of a mobile-friendly UX.
Thanks to the following users for asking:
We need a way to trigger this:
http://postgrest.org/en/v6.0/admin.html#schema-reloading
Inside the table view, we should show the columns for a table even when there are no rows.
Thanks for the feedback @sieglerz.
Requested by @sieglerz
At the moment the queries/history are lost when a user navigates away from the page. We should allow them to save/store/persist the snippets.
BTW sieglerz, this is definitely in the pipeline, but a bit lower on the priorites. Long-term we will offer custom-built dashboards, made of queries/graphs etc
supabase/postgrest-js
to 0.15.0I'm submitting a ...
[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
Summary
When passing a string pattern with the percentage sign (%) to the function .like() or .ilike(), the expected output is not attained.
Other information
According to the PostgREST documentation, the percentage sign (%) should be replaced with an asterisk (*) instead.
@dragarcia I just want to check if you implemented the rpc
function in supabase-js
? I can't find it in any of the branches?
I'm submitting a ...
[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
Summary
supabase will not compile with Svelte.
I run:
npx degit sveltejs/template test1
npm install
npm install --save @supabase/supabase-js
npm run dev
Finally, in my App.svelte file I put:
import { createClient } from '@supabase/supabase-js'
// Create a single supabase client for interacting with your database
const supabase = createClient("https://xyzcompany.supabase.co", "1a2b-3c4d-5e6f-7g8h");
And I get the following error message:
> [email protected] dev C:\PycharmProjects\test1
> rollup -c -w
rollup v2.11.2
bundles src/main.js โ public\build\bundle.js...
[!] Error: Unexpected token (Note that you need @rollup/plugin-json to import JSON
files)
node_modules\websocket\package.json (2:9)
1: {
2: "_from": "websocket@^1.0.31",
^
3: "_id": "[email protected]",
4: "_inBundle": false,
Error: Unexpected token (Note that you need @rollup/plugin-json to import JSON file
s)
at error (C:\PycharmProjects\test1\node_modules\rollup\dist\shared\rollup.js:217:30)
at Module.error (C:\PycharmProjects\test1\node_modules\rollup\dist\shared\rollup.js:15145:16)
at tryParse (C:\PycharmProjects\test1\node_modules\rollup\dist\shared\rollup.js:15034:23)
at Module.setSource (C:\PycharmProjects\test1\node_modules\rollup\dist\shared\rollup.js:15436:30)
at ModuleLoader.addModuleSource (C:\PycharmProjects\test1\node_modules\rollup\dist\shared\rollup.js:17430:20)
If I remove the lines from my App.svelte file, npm run dev
works fine.
npm install @rollup/plugin-json --save-dev
upsert: true
option to insert()
optionsIt should be noted that upserts only work with Primary Keys (according to the docs: http://postgrest.org/en/v6.0/api.html#upsert)
We will need to add a "PUT" call if upsert is true
Now that we have column level filtering in Realtime (here: supabase/realtime#15) we should be able to implement this into supabase-js
with the following syntax
supabase
.from('users')
.eq('id', 2)
.subscribe()
which would filter to only receive changes from user ID 2.
To do this, the "room name" should be the same format as PostgREST. i.e.:
realtime:public:users:id=eq.2
This issue is for tracking requests/demand for more plugins/extensions. Give a thumbs up if you want an extension added.
Please refrain from adding comments unless you are adding an extension which isn't already listed.
At the moment we are providing key auth using an API key on each request. For the REST requests, this is passed as a header. For the sockets, this is necessarily passed as a URL parameter because most browsers strip the headers for Sockets.
This is not ideal. It is only considered safe on serverside where there is less chance of discovering the key.
Even if we allowed multiple keys, this doesn't solve authorization. Once a user is provided access, how do we ensure they aren't accessing other people's data? This is especially tricky for our realtime server, where we would need to run some logic for every change request to know if the change is relevant for each connected user.
This is a non-starter. We don't want to add our own auth system. We can integrate with others, but we don't want to force our opinionated systems on others. We should provide general solutions which work for everyone - even legacy systems.
We could leverage Postgres' Row level security, roles and users. This is very attractive since the level of security it provides is amazing. We would delegate much of this work to the tools which we use:
It would look something like this:
Pros
Cons:
We can provide them with one API proxy per-project(database):
This proxy would need to run serverless functions so that the user can add their own logic. When we deploy a new server for them, we can add some basic rules (like we already have), and then it is up to them to add any advanced rules. We can offer plugins and templates to make this simple
Pros
Cons
I'm submitting a ...
[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
Summary
Hi there, I tried to install and using supabase libary in my project. Unfortunately, I got an error
The package at "node_modules/@supabase/realtime-js/src/socket.js" attempted to import the Node standard library module "querystring". It failed because React Native does not include the Node standard library. Read more at https://docs.expo.io/versions/latest/introduction/faq/#can-i-use-nodejs-packages-with-expo
Failed building JavaScript bundle.
The package at "node_modules/@supabase/realtime-js/src/socket.js" attempted to import the Node standard library module "querystring". It failed because React Native does not include the Node standard library. Read more at https://docs.expo.io/versions/latest/introduction/faq/#can-i-use-nodejs-packages-with-expo
Testing:
I'm submitting a ...
[ ] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[x] question about how to use this project
Summary
I'm not sure what license this project is under, could you add it to the repo, please?
Looks really interesting though!
I'm submitting a ...
[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
Summary
When passing an empty array, realtime returns [NaN]
Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)
In this scenario, days
is an int array.
I maintain a Degoogle guide and Supabase is under consideration to be added as a Firebase alternative. Is it possible to self-host Supabase, or will it be possible in the future? If not, what country/ies are your hosting servers located in?
Thank you!
There are PrismJS plugins that solve this, however I'm not sure how to get them working with Docusaurus
after running:
const mySubscription = await supabase
.from('messages')
.on('*', callbackAction)
.subscribe()
if I inspect supabase.subscriptions
, I can see two subscriptions, the second of which is mostly empty:
Supabase {
tableName: 'messages',
restUrl: 'http://localhost:8000/rest/v1',
realtimeUrl: 'ws://localhost:8000/realtime/v1',
schema: 'public',
uuid: '516eab5e-5f4b-3fb6-d049-8b7eeb02b03a',
apikey: 'examplekey',
socket: null,
channel: null,
listeners: {},
queryFilters: []
}
the problem is if I pass it to supabase.removeSubscription
it throws an exception:
TypeError: Cannot read property 'disconnect' of null
at Supabase.unsubscribe (src/Supabase.js:133:17)
at SupabaseClient.removeSubscription (src/index.js:44:20)
at Context.<anonymous> (test/integration/testRealtime.js:16:16)
at processImmediate (internal/timers.js:439:21)
Page: /account/me
Description: When I save my first and last name, then leave by going to Organizations, and then back to Preferences - my name doesn't display. Just blanks. When I force full reload on the web page, then my name shows up. So it is storing it in the back end, but not updating the front end data to reflect that
Thanks to these users for contributing/reporting:
There seem to be 2 problems, not with the tests themselves but rather with the doctest
library:
/**
* Converts the value of an individual column
* @param {String} columnName The column that you want to convert
* @param {{name: String, type: String}[]} columns All of the columns
* @param {Object} records The map of string values
* @param {Array} skipTypes An array of types that should not be converted
* @return {object} Useless information
*
* @example
* convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], ['Paul', '33'], [])
* //=>
* 33
*
* @example
* convertColumn('age', [{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], ['Paul', '33'], ['int4'])
* //=>
* "33"
*/
export const convertColumn = (columnName, columns, records, skipTypes) => {
let column = columns.find(x => x.name == columnName)
if(skipTypes.includes(column.type)) return noop(records[columnName])
else return convertCell(column.type, records[columnName])
}
Change the "33" to 33 and it will still return true.
/**
* Takes an array of columns and an object of string values then converts each string value
* to its mapped type
* @param {{name: String, type: String}[]} columns
* @param {Object} records
* @param {Object} options The map of various options that can be applied to the mapper
* @param {Array} options.skipTypes The array of types that should not be converted
*
* @example
* convertChangeData([{name: 'first_name', type: 'text'}, {name: 'age', type: 'int4'}], {'Paul', '33'}, {})
* //=>
* { first_name: 'Paul', age: 33 }
*/
export const convertChangeData = (columns, records, options = {}) => {
let result = {}
let skipTypes = typeof options.skipTypes !== 'undefined' ? options.skipTypes : []
Object.entries(records).map(([key, value]) => {
result[key] = convertColumn(key, columns, records, skipTypes)
})
return result
}
This @example is causing the library to break.
The concept of the library is awesome, so I think we should pitch in to improve it. Other likely improvements:
We should be able to add descriptions to the examples (if it fits the JSdoc spec)
/**
* @example Add an example description here
* convertCell('bool', 'true')
* //=>
* true
*/
We should be able to add descriptions to the return values (if it fits the JSdoc spec)
/**
* @example
* convertCell('bool', 'true')
* //=> Add a return value description here
* true
*/
https://supabase.io/docs/library/get/#in
'["China", "France"]'
or ['China', 'France']
?
need to test whether this should be wrapped as a string or not
currently facing other issues which means I can't test it right now, so saving here for later investigation
Congrats on the launch.๐
Wanted to ask about what's on the horizon for future SDK's, especially for Dart/Flutter who use native Kotlin/Java and Swift/Obj-C apis.
I'm submitting a ...
[ x ] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
Summary
When I read data from supabase, it returns a Promise instead of response array.
const getArtworks = async () => {
try {
let artworks = await supabase.from('artworks').select('*')
return artworks
} catch (error) {
console.log('Error: ', error)
}
}
@awalias I'm interested on your take on licensing.
There seem to be a wave of great opensource projects that have to switch to a more restrictive license, basically because their existence is threatened by the big cloud players. Here are some that I know of using Business Source.
I really like MIT / Apache2.0, but I have to sympathise with these companies. I think no matter what, we have to be on a fully permissive license (for everything?), but keen to hear your thoughts.
No action required, I just want to kick off this discussion
At the moment we have implemented our realtime to listen to basic events:
supabase
.from('users')
.eq('id', 1)
.subscribe()
But ideally we want to get to something like our select:
supabase
.from('users')
.eq('id', 1)
.select(`
id,
name,
todos (id, description)
`)
What would this look like? Ideally we could use the same select
graph in our subscribe
:
supabase
.from('users')
.eq('id', 1)
.subscribe(`
id,
name,
todos (id, description)
`)
Then we would get the updates for the users, but also any updates to their todos. This is incredibly challenging, because the middleware needs to receive all the change events then decide if event "fits" into a subscription. But the benefits are enormous.
For example, we are using MobX right now - imagine the mobx store was just one big subscription like above? You could even just write a React wrapper around your whole app - no store necessary.
It seems that that Postgraphile have worked out a lot of the complicated parts with LiveQueries.
They have a caveat on their docs that it's still unstable and should only be used for small graphs (understandable).
They also offer a plugin interface for the database listener: https://www.graphile.org/postgraphile/live-queries/#realtime-provider-plugins
This is where supabase/realtime
could probably help. Their current plugin requires wal2json
. They even call out that they need a separate server at scale. Also their implementation requires refetching the data:
https://www.graphile.org/postgraphile/live-queries/#performance
I'm submitting a ...
[*] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
Summary
iphone 6s / ios 13.3 / safari
could not scroll horizontally on code samples on homepage
The Repositories section uses a separate set of data from the traction chart. These should get updated at the same time as the traction chart.
I'm submitting a ...
[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
Summary
Just a super small text change. The email address looks to be incorrect
Ref: https://app.supabase.io/account/me
was expecting
supabase
.from('messages')
.match({ id: 1 })
.update({ message: 'updated message yo' })
.then(console.log)
.catch(console.error)
to update, but instead got:
{
body: null,
status: 400,
statusCode: 400,
statusText: '.update() cannot be invoked without any filters.'
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.