https://supabase.com/ logo
Join Discord
Powered by
# javascript
  • e

    Ethanxyz

    08/21/2021, 8:37 AM
    I am not sure I just followed all the steps a few week back building another project and everything worked out the box
  • e

    Ethanxyz

    08/21/2021, 8:37 AM
    it was the easiest auth I have ever seen
  • e

    Ethanxyz

    08/21/2021, 8:37 AM
    which is why i might just go back to svelte + svelte-spa-router
  • e

    Ethanxyz

    08/21/2021, 8:38 AM
    the only thing is, this is an app I want users to use, so it would kinda such to have hash based routes lol
  • r

    rotimi-best

    08/21/2021, 8:39 AM
    We need to look at the code 😅 Anyways, I used sveltekit for my supabase hackathon project, it also had auth, you can check it out. https://github.com/rotimi-best/sveltedoc
  • e

    Ethanxyz

    08/21/2021, 8:39 AM
    did you ever try this in basic svelte
  • r

    rotimi-best

    08/21/2021, 8:39 AM
    No, I always wanted the beauty of server side rendering cause I didn't want to manage routing 🙂
  • e

    Ethanxyz

    08/21/2021, 8:40 AM
    I think thats why
  • e

    Ethanxyz

    08/21/2021, 8:40 AM
    I think basic svelte this works out the box
  • e

    Ethanxyz

    08/21/2021, 8:40 AM
    and SSR probably screws things up and requires these extra steps
  • e

    Ethanxyz

    08/21/2021, 8:41 AM
    again, more reason for me to move back to basic svelte + hash router, but idk I will try your code snippet and lyk how it goes
  • e

    Ethanxyz

    08/21/2021, 8:41 AM
    any reason to use sveltekit over basic svelte other than routing. I am building an ecommerce app with 5 items lol, so Idk if SSR is worth
  • r

    rotimi-best

    08/21/2021, 8:44 AM
    Well, you just have to read comparisons between CSR and SSR then make the decision if it is worth it for your project. I personally decided to go all out with sveltekit or sapper cause I want the flexibility in the future to do both of them. Cause sveltekit has support for both modes however if my project grew I didn't want to worry about rewriting my code
  • r

    rotimi-best

    08/21/2021, 8:45 AM
    The main magic is here https://github.com/rotimi-best/sveltedoc/blob/main/src/routes/__layout.svelte The code is not the best though so please bear with me, I rushed to get the project ready for the hackathon 😅
  • e

    Ethanxyz

    08/21/2021, 8:45 AM
    Ahh I see
  • e

    Ethanxyz

    08/21/2021, 8:47 AM
    yeah I am not sure if I should be using SSR for this. Might be easier for me to just use svelte and another router and just have this all set up out the box. I already built a full crud app that way, so I have a lot of re-useable code. I plan on using a payment api too, so I would prefer to focus my time on that right now. This is only a beta anyway. I hope that the team can give a sveltekit guide, because I think it is quickly becoming standard.
  • e

    Ethanxyz

    08/21/2021, 8:48 AM
    for svelte community that is
  • r

    rotimi-best

    08/21/2021, 8:50 AM
    Good luck 🤓
  • e

    Ethanxyz

    08/21/2021, 9:15 AM
    lol so weird
  • e

    Ethanxyz

    08/21/2021, 9:15 AM
    now when I try to follow the svelte guide I get an error on
    __api is not defined
    .
  • e

    Ethanxyz

    08/21/2021, 9:16 AM
    Copy code
    js
    
    import { createClient } from '@supabase/supabase-js'
    
    const supabaseUrl = __api.env.SVELTE_APP_SUPABASE_URL
    const supabaseAnonKey = __api.env.SVELTE_APP_SUPABASE_ANON_KEY
    
    export const supabase = createClient(supabaseUrl, supabaseAnonKey)
  • e

    Ethanxyz

    08/21/2021, 9:16 AM
    I am using the same code lol
  • e

    Ethanxyz

    08/21/2021, 9:16 AM
    and my other project works just fine...
  • j

    jak

    08/23/2021, 2:02 PM
    Hey folks! I'm changing our app from GraphQL to the Supabase API and struggling to find help docs for what GQL would call Query Variables. I have minimal experience with Rest APIs and just wondering if what the equivalent is?
  • d

    david-thyresson

    08/23/2021, 2:47 PM
    Hi @jak, have you thought of keeping the GraphQL api, but just change your resolvers to use the Supabase API instead to fetch data?
  • d

    david-thyresson

    08/23/2021, 2:49 PM
    GraphQL provides a way for the client to query (or mutate) data, but it doesn't actually perform the query (a select) or a mutation (an insert/update). Also, the question is are you removing your entire backend api and instead using Supabase's client app-side (auth, rls, etc)?
  • j

    jak

    08/23/2021, 3:47 PM
    Hi @User , I'd love to keep GraphQL but I haven't found a good GQL server/provider based in the UK/Europe. Tested a set up with both Hasura and Stepzen connected to Supabase and am getting a shocking 2600ms latency! I'm now using the Supabase API (using a react hooks library) and queries are a very respectable 90ms. For speed reasons i'm dropping the current backend and going with Supabase's client app-side
  • s

    Scott P

    08/23/2021, 4:17 PM
    I run a self-hosted Apollo server on DigitalOcean (London data-centre) and the latency is minimal. I believe they also provide a Hasura image that you can deploy to any of their data-centres. With that said, you'll be saving some money by not having to have an API and a Supabase both deployed. Unless you're running an API that's going to be consumed by third-parties, sticking with Supabase client libs is a good way to go.
  • a

    AlexisG

    08/24/2021, 11:27 AM
    Supabase support React Native ?
  • u

    user

    08/24/2021, 11:49 AM
    Hi, I'm trying to get the this repo https://github.com/vercel/nextjs-subscription-payments up and running, but I keep seeing the error message:
    Copy code
    Could not find a relationship between products and prices in the schema cache
    {
      hint: 'If a new foreign key between these entities was created in the database, try reloading the schema cache.',
      message: 'Could not find a relationship between products and prices in the schema cache'
    }
    When hosted on vercel, it show the attached image. The subscription pricing plans should be setup as of now. Can anyone lead me in the right direction?
1...121314...81Latest