Skip to content

Instantly share code, notes, and snippets.

View codingphasedotcom's full-sized avatar
💭
Working a new course

codingphasedotcom

💭
Working a new course
View GitHub Profile
@codingphasedotcom
codingphasedotcom / custom-sessions.js
Created October 21, 2021 18:04
Shopify APP CLI MYSQL Prisma Custom Session Storage
import { PrismaClient } from '@prisma/client';
import Shopify from '@shopify/shopify-api';
import { Session } from '@shopify/shopify-api/dist/auth/session';
const prisma = new PrismaClient();
module.exports.storeCallback = async function storeCallback(session){
console.log('Running storeCallback')
const payload = { ...session }