Code Monkey home page Code Monkey logo

sapper-graphql-firebase's Issues

Circular dependency warnings

Hi, and thanks for the template, very useful and well crafted!
A doubt about one thing though: I get

Circular dependency: src/firebase/auth.js -> src/firebase/init.js -> src/firebase/auth.js

Would it be possible to move the authListener maybe in the init.js file so that it would not need circular imports?

Also, a nice to have, some comments/readme about the operations going on with the auth + forkJoin + tap + etc. for a non RxJs developer

What's the best way to add `firestore`?

The machinery to import and use firebase is different from standard templates that one finds around, so a copy paste would not work here.

As of now, to use firestore I am obliged to instantiate a db variable, and assign to it the firestore instantiation with a subscription.
Here's the code:

import { collectionData } from 'rxfire/firestore';
import { firebaseApp$ } from '../firebase';

let db;
firebaseApp$.subscribe(firebaseApp => (db = firebaseApp.firestore()))

This works.
However, instead of passing through firebaseApp$, I would prefer to have db instantiated inside firebase/index.js and to just import it with

import { db } from '../firebase'.

How could it be done?

Graphql Setup

Hey, thanks again for this template. I am a bit of a noob, and I am looking into setting up graphql in my sapper app using hasura. Would you still recommend this setup for graphql? I was looking at the svelte-apollo package but I like your approach better, I just don't know enough yet to know if there are any things to be aware of with this approach.

Thanks again for your time!

config.js example with empty data

Can I see the src/firebase/config.js example with empty data?
Or where can I see the example config.js?

'config' is not exported by src/firebase/config.js, imported by src/firebase/init.js
2: import { map, tap } from 'rxjs/operators'
3: import { authListener } from './auth'
4: import { config } from './config'

my config.js

var firebaseConfig = {
    apiKey: "*******************************************",
    authDomain: "sapper-jwt.firebaseapp.com",
    databaseURL: "https://sapper-jwt.firebaseio.com",
    projectId: "sapper-jwt",
    storageBucket: "sapper-jwt.appspot.com",
    messagingSenderId: "**********************",
    appId: "1:****************:web:*******************"
  };

Thank you!

Thanks so much for making this available, I have been struggling for days to figure out how to get firebase auth working with sapper.

Issue with deployment to now

Hi Dre,

I've been fascinated by your setup here for the past few days, learned about some new platforms like Hasura.
But I've been stuck on trying to get this to run on Now 2.
I think I've done everything needed.
My .env file contains hasura credentials etc.
I added a config.js file to the src/firebase/ folder
Successfully deployed the function to add the hasura tokens from firebase auth
And locally it works like a charm to log in and log out.

So my next step was to try and deploy it to now, and that's where I'm stuck.
I keep getting a 500 server error message, and it is complaining about modules in server.js not being found.
Do you have any pointers on how you've gotten this to work for you?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.