This file contains hidden or 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 { GraphQLServer } = require('graphql-yoga'); | |
const typeDefs = ` | |
type Query { | |
dogName: String! | |
} | |
`; | |
const resolvers = { | |
Query: { |
This file contains hidden or 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 Dog { | |
id: ID! @unique | |
name: String! | |
type: String! | |
} |
This file contains hidden or 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
# Prisma API HTTP endpoint | |
endpoint: '' | |
# Data model file name | |
datamodel: datamodel.graphql | |
# API access secret | |
secret: testsecret |
This file contains hidden or 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
mutation { | |
createDog(data: { | |
name: "Tommy", | |
type: "Chihuahua" | |
}) { | |
id | |
} | |
} | |
This file contains hidden or 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
query { | |
dogs{ | |
id, | |
name, | |
type | |
} | |
} | |
This file contains hidden or 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 { GraphQLServer } = require('graphql-yoga'); | |
const { Prisma } = require('prisma-binding'); | |
const typeDefs = ` | |
type Query { | |
dogName: String! | |
} | |
`; | |
const resolvers = { |
This file contains hidden or 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 { GraphQLServer } = require('graphql-yoga'); | |
const { Prisma } = require('prisma-binding'); | |
const typeDefs = ` | |
type Query { | |
dogName: String! | |
} | |
`; | |
const resolvers = { |
This file contains hidden or 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 { | |
dogName: String! | |
dogs: [Dog!]! | |
} | |
type Mutation { | |
dog(type: String!, name: String!): Dog! | |
} | |
type Dog { |
This file contains hidden or 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
projects: | |
app: | |
schemaPath: src/schema.graphql | |
extensions: | |
endpoints: | |
default: http://localhost:4000 | |
database: | |
schemaPath: src/generated/prisma.graphql | |
extensions: | |
prisma: database/prisma.yml |
This file contains hidden or 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
# Deploy hook | |
hooks: | |
post-deploy: | |
- graphql get-schema --project database |
OlderNewer