Title
c

chuksfestus

11/19/2018, 9:26 PM
Hello all, so i have an app that uses firebase for mostly auth and real time db and i was thinking of moving to graphql, does prisma handle things like real time db? and also other things firebase offers
l

lfades

11/19/2018, 9:46 PM
Realtime is handled by subscriptions in GraphQL, and Prisma has subscriptions
c

chuksfestus

11/19/2018, 9:54 PM
oh ok thanks
l

lfades

11/19/2018, 10:11 PM
AFAIK Prismas doesn’t have a auth solution like firebase auth
I’ll recommend you to stick with it (also because it’s free)
but use it inside your Prisma instance
m

Mike

11/19/2018, 11:04 PM
Prisma doesn't have auth out of the box, but the
graphql-boilerplate
does. Typically, you use prisma behind a graphql proxy server that includes auth and a sanitized schema. Check out https://github.com/graphql-boilerplates/typescript-graphql-server/tree/master/advanced , which includes auth
l

lfades

11/19/2018, 11:47 PM
@Mike That's a very simple auth that's only recommended for small projects
m

Mike

11/19/2018, 11:49 PM
It's not simple at all. It's an auth system that's tied to a JWT token. It includes hashing for the password. Those are all modern best-practices.
You can customize it easily by changing the JWT expiry time. Or you can add a prop to the JWT for a session id which you store in your DB to allow for session revocation. It's a full-featured modern suitable auth system.
l

lfades

11/20/2018, 2:10 AM
it's all of that included in that example ?
I only saw a basic setup with a JWT token with no expiration, that's what I mean by simple.