Skip to content

Instantly share code, notes, and snippets.

View nikolasburk's full-sized avatar
😑

Nikolas nikolasburk

😑
View GitHub Profile
const resolvers = {
Query: {
hello: () => `Hello World`
}
}
const resolvers = {
Query: {
user: (root, args) => db.getUser(argd.id),
users: () => db.getUsers(),
},
Mutation: {
createUser: (root, args) => db.createUser(args.name),
updateUser: (root, args) => db.updateUser(args.id, args.name),
deleteUser: (root, args) => db.deleteUser(args.id),
},
const resolvers = {
Query: {
user: (root, args) => db.getUser(argd.id),
users: () => db.getUsers(),
},
Mutation: {
createUser: (root, args) => db.createUser(args.name),
updateUser: (root, args) => db.updateUser(args.id, args.name),
deleteUser: (root, args) => db.deleteUser(args.id),
}
import { GraphQLServer } from 'graphql-yoga'
const typeDefs = `
type Query {
hello: String!
}
`
const resolvers = {
Query: {
@nikolasburk
nikolasburk / stitching.graphql
Last active June 29, 2018 12:07
stitching.graphql
query myMenu {
menu {
burger {
bun
cheese
patty
}
salad {
romaine
tomato

Get Your Own Prisma Client Explorer

To get your own Prisma client explorer on CodeSandbox that allows for database writes, you need to perform the following steps:

1. Fork the CodeSandbox

2. Open new Terminal tab

Get Your Own Prisma Client Explorer

This project uses a hosted database that has writes disabled. Follow these steps to set up your own demo database that lets you perform database writes:

1. Fork the CodeSandbox

To get your own version of this sandbox, click the Fork button in the top-left corner (then wait until the embedded browser in the new Sandbox ):

### This file was autogenerated by Nexus 0.9.9
### Do not make changes to this file directly
type AggregatePost {
count: Int!
}
type AggregateUser {
count: Int!
type Post {
id: ID! @unique
createdAt: DateTime!
updatedAt: DateTime!
title: String!
published: Boolean! @default(value: "false")
author: User
comments: [Comment!]!
}

Personal response to this Twitter thread

I've just been taking a hard look at prisma. and to me it seems like crutch, rather than a solution. my guess is that it works for very simple stuff, but it's not usable for anything more or less "serious".

There are many serious developers and larger companies using Prisma in production today, such as adidas, HyreCar (recently IPOed) or Labelbox (just raised 10mio series A). We have no doubt that Prisma can be used for "serious" applications!

The docs are basically marketing material. "under the hood" doc provides no information I was hoping to find at least there. starting from "how queries are optimized"? some tutorial says there's a dataloader, but that's about it.

You're definitely right that our docs are lacking behind at the moment! We are working on the nex