Skip to content

Instantly share code, notes, and snippets.

View heymartinadams's full-sized avatar
🌎
Another beautiful day on our beautiful planet ❤️

Martin Adams heymartinadams

🌎
Another beautiful day on our beautiful planet ❤️
View GitHub Profile
{
users {
email
nameFirst
nameLast
}
}
module.exports = async (parent, args, { prisma, ...ctx }, info) => {
try {
return await prisma.user.findMany()
} catch (error) {
throw new Error(error)
}
}
const { PrismaClient } = require('@prisma/client')
const prisma = new PrismaClient()
module.exports = async (parent, args, ctx, info) => {
try {
return await prisma.user.findMany()
} catch (error) {
throw new Error(error)
}
}
@heymartinadams
heymartinadams / react-input.js
Last active October 31, 2020 17:59
Medium essay
<Input
autocomplete='off'
disabled={false}
autofocus={true}
inputRef={null}
name='myInput'
onBlur={x => console.log(x)}
onChange={x => console.log(x)}
onKeyDown={x => console.log(x)}
placeholder='Please enter a value'
<Input
{...{
autocomplete: 'off',
disabled: false,
autofocus: true,
inputRef: null,
name: 'myInput',
onBlur: x => console.log(x),
onChange: x => console.log(x),
onKeyDown: x => console.log(x),
# This is a basic workflow to help you get started with Actions
name: Reflect Regression Tests
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
pull_request:
branches: [main]