KyleG
05/08/2018, 9:17 PMprisma deploy
the mysql DB generates everything (all my tables and relations are there, cool), but generated/prisma.graphql
is unchanged from the one that the boilerplate gave me not long ago (where it's just users and feeds and posts). I can delete and reset my stuff as much as a want, and prisma deploy
seems to complete just fine - but the generated schema is totally unchanged.KyleG
05/08/2018, 9:27 PM# Download the GraphQL schema of the Prisma API into
# `src/generated/prisma.graphql` (as specfied in `.graphqlconfig.yml`).
hooks:
post-deploy:
- graphql get-schema --project database
It seems that my locally hosted prisma server isn't behaving correctly. Hitting <http://localhost:4466/server/dev>
(my server is just called "server" and I'm on the "dev" stage) it complains I don't have auth. So I add the bearer token to the HTTP header and instead simply get an error: Response not successful: Received status code 500
KyleG
05/08/2018, 9:33 PMgraphql get-schema --project database
Gives me this big hairy error:KyleG
05/08/2018, 9:35 PMā
Boxed Error: {
"response": {
"errors": [{
"message": "Boxed Error",
"requestId": "local:api:cjgy6wp2j007e0776atxlxjk0"
}],
"status": 500
},
"request": {
"query": "
query IntrospectionQuery {
__schema {
queryType {
name
}
mutationType {
name
}
subscriptionType {
name
}
types {
...FullType
}
directives {
name
description
locations
args {
...InputValue
}
}
}
}
fragment FullType on __Type {
kind
name
description
fields(includeDeprecated: true) {
name
description
args {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
description
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}
fragment InputValue on __InputValue {
name
description
type { ...TypeRef
}
defaultValue
}
fragment TypeRef on __Type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
}
"}}
nilan
05/08/2018, 9:40 PMKyleG
05/08/2018, 9:44 PM# A student has a single enrollment row. An enrollment is their place in the school.
type Enrollment {
id: ID! @unique
student: User! @unique @relation(name: "UserToEnrollment")
courses: [Course!]! @relation(name: "EnrollmentToCourse")
}
Wasn't entirely sure if using @unique on a specific type or having two directives on a line was OK. Suppose not!nilan
05/08/2018, 9:47 PM