This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Query { | |
posts: [Post!]! | |
post(id: ID!): Post | |
} | |
type Mutation { | |
createDraft(title: String!, content: String): Post | |
deletePost(id: ID!): Post | |
publish(id: ID!): Post | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type User { | |
id: ID! @id | |
createdAt: DateTime! | |
updatedAt: DateTime! | |
firstName: String! | |
lastName: String! | |
email: String! @unique | |
password: String! | |
phone: String! | |
responseRate: Float |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# THIS FILE HAS BEEN AUTO-GENERATED BY THE "GRAPHCOOL DEPLOY" | |
# DO NOT EDIT THIS FILE DIRECTLY | |
# | |
# Model Types | |
# | |
type User implements Node { | |
id: ID! | |
name: String! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# THIS FILE HAS BEEN AUTO-GENERATED BY "PRISMA DEPLOY" | |
# DO NOT EDIT THIS FILE DIRECTLY | |
# | |
# Model Types | |
# | |
type User implements Node { | |
id: ID! | |
name: String! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { Context } from '../../'; | |
type EditReleaseInput = { | |
data: { | |
releaseId: string, | |
title?: string, | |
}, | |
}; | |
export default async ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { idArg } from 'gqliteral' | |
import { prismaObjectType } from '../../../plugin' | |
import { prisma } from '../../generated/prisma-client' | |
export const Query = prismaObjectType('Query', t => { | |
t.prismaFields(['products', 'options', 'brands']) | |
t.field('otherProduct', 'Product', { | |
args: { id: idArg({ required: true }) }, | |
resolve: (parent, { id }) => prisma.product({ id }), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { PostResolvers } from '../generated/graphqlgen' | |
import { prisma } from '../generated/prisma-client'; | |
export const Post: PostResolvers.Type = { | |
...PostResolvers.defaultResolvers, | |
published: parent => parent.isPublished, | |
author: (parent, args, ctx) => ctx.db.post({ id: parent.id }).author(), | |
} | |
async function main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type MyCustomDef struct { | |
} | |
myRes := MyCustomDef{} | |
err := prisma.GraphQL(`{ | |
users { | |
* | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const query1 = `{ | |
user(id: "$id") { | |
* | |
} | |
}` | |
type query1 = `{ | |
user(id: "$id") { | |
* | |
} | |
}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code generated by github.com/prisma/graphqlgen, DO NOT EDIT. | |
import { GraphQLResolveInfo } from 'graphql' | |
import { Context } from '../types' | |
import { PostNode } from './prisma-client' | |
import { UserNode } from './prisma-client' | |
export namespace QueryResolvers { | |
export const defaultResolvers = {} |
NewerOlder