John Smeeth
11/28/2018, 7:47 AMerr: graphql: Project not found: 'go-graphql$dev'
divyendu
11/28/2018, 8:45 AMprisma deploy
command?John Smeeth
11/28/2018, 9:33 AMdivyendu
11/28/2018, 9:35 AMprisma.yml
file!John Smeeth
11/28/2018, 9:38 AM# Specifies the HTTP endpoint of your Prisma API.
endpoint: <http://localhost:4466>
# Defines your models, each model is mapped to the database as a table.
datamodel: datamodel.prisma
# Specifies the language and directory for the generated Prisma client.
generate:
- generator: go-client
output: ../prisma-client/
# Ensures Prisma client is re-generated after a datamodel change.
hooks:
post-deploy:
- prisma generate
# # Seeds initial data into the database by running a script.
# seed:
# run: go run seed.go
divyendu
11/28/2018, 9:40 AM<http://localhost:4466>
which means that the service and stage names would be "default" instead of "go-graphql" and "dev"prisma generate
again!John Smeeth
11/28/2018, 9:43 AMprisma generate
. but it still theredivyendu
11/28/2018, 9:50 AMJohn Smeeth
11/28/2018, 9:52 AMdivyendu
11/28/2018, 9:53 AMJohn Smeeth
11/28/2018, 10:34 AMdivyendu
11/28/2018, 10:50 AMnikolasburk
11/28/2018, 12:11 PMJohn Smeeth
11/29/2018, 3:17 AM~/g/s/c/p/g/graphql> prisma deploy
? Set up a new Prisma server or deploy to an existing server? Demo server
? Choose the region of your demo server johnsmeeth0210/demo-eu1
? Choose a name for your service prisma
? Choose a name for your stage dev
Written endpoint `<https://eu1.prisma.sh/johnsmeeth0210/prisma/dev>` to prisma.yml
Creating stage dev for service prisma !
ERROR: Whoops. Looks like an internal server error. Search your server logs for request ID: eu1:cjp1wtzj6002h0a03br38qk5v
{
"data": {
"addProject": null
},
"errors": [
{
"message": "Whoops. Looks like an internal server error. Search your server logs for request ID: eu1:cjp1wtzj6002h0a03br38qk5v",
"path": [
"addProject"
],
"locations": [
{
"line": 2,
"column": 9
}
],
"requestId": "eu1:cjp1wtzj6002h0a03br38qk5v"
}
],
"status": 200
}
018/11/29 10:14:44 Server is running on <http://localhost:4000>
Post : unsupported protocol scheme ""
goroutine 34 [running]:
runtime/debug.Stack(0x1, 0x0, 0x0)
/usr/local/Cellar/go/1.11.2/libexec/src/runtime/debug/stack.go:24 +0xa7
runtime/debug.PrintStack()
/usr/local/Cellar/go/1.11.2/libexec/src/runtime/debug/stack.go:16 +0x22
clones/prisma-examples/go/graphql/vendor/github.com/99designs/gqlgen/graphql.DefaultRecover(0x14ec200, 0xc000358c30, 0x140aea0, 0xc000359350, 0x0, 0x4000105)
/Users/alex/go/src/clones/prisma-examples/go/graphql/vendor/github.com/99designs/gqlgen/graphql/recovery.go:16 +0xa7
main.(*executionContext).FieldMiddleware.func1(0xc000286d40, 0x14ec200, 0xc000358c30, 0xc000145900)
/Users/alex/go/src/clones/prisma-examples/go/graphql/server/generated.go:2626 +0x78
panic(0x140aea0, 0xc000359350)
/usr/local/Cellar/go/1.11.2/libexec/src/runtime/panic.go:513 +0x1b9
main.(*mutationResolver).CreateDraft(0xc0003ac068, 0x14ec200, 0xc000358c30, 0xc000382121, 0xa, 0xc000286dc0, 0xc000382156, 0xb, 0x0, 0x0, ...)
/Users/alex/go/src/clones/prisma-examples/go/graphql/server/resolver.go:44 +0x1dc
main.(*executionContext)._Mutation_createDraft.func1(0x14ec200, 0xc000358c30, 0xc000296030, 0xc000145898, 0x20, 0xc000145890)
/Users/alex/go/src/clones/prisma-examples/go/graphql/server/generated.go:574 +0x252
clones/prisma-examples/go/graphql/vendor/github.com/99designs/gqlgen/graphql.DefaultResolverMiddleware(0x14ec200, 0xc000358c30, 0xc0003ae300, 0x14ec200, 0xc000358c30, 0xc000145900, 0xc0003ae300)
/Users/alex/go/src/clones/prisma-examples/go/graphql/vendor/github.com/99designs/gqlgen/graphql/context.go:35 +0x3a
main.(*executionContext).FieldMiddleware(0xc000286d40, 0x14ec200, 0xc000358c30, 0x0, 0x0, 0xc0003ae300, 0x0, 0x0)
/Users/alex/go/src/clones/prisma-examples/go/graphql/server/generated.go:2630 +0xa1
main.(*executionContext)._Mutation_createDraft(0xc000286d40, 0x14ec200, 0xc000358b70, 0xc000283900, 0xc0003ae2e0, 0x2, 0x2, 0x1, 0xc0003ae2c0)
/Users/alex/go/src/clones/prisma-examples/go/graphql/server/generated.go:572 +0x1fe
main.(*executionContext)._Mutation(0xc000286d40, 0x14ec200, 0xc000358b70, 0xc000286ac0, 0x1, 0x1, 0x1c02880, 0x0)
/Users/alex/go/src/clones/prisma-examples/go/graphql/server/generated.go:509 +0x5b9
main.(*executableSchema).Mutation.func1(0x14ec200, 0xc000358b40, 0x14245c0, 0x1413701, 0xc0003ae2a0)
/Users/alex/go/src/clones/prisma-examples/go/graphql/server/generated.go:463 +0x61
clones/prisma-examples/go/graphql/vendor/github.com/99designs/gqlgen/graphql.DefaultRequestMiddleware(0x14ec200, 0xc000358b40, 0xc0003ae2a0, 0xc000264d40, 0xc000145be0, 0x102aea2)
/Users/alex/go/src/clones/prisma-examples/go/graphql/vendor/github.com/99designs/gqlgen/graphql/context.go:43 +0x3a
main.(*executableSchema).Mutation(0xc000160000, 0x14ec200, 0xc000358b40, 0xc00035c070, 0xc000358b40)
/Users/alex/go/src/clones/prisma-examples/go/graphql/server/generated.go:462 +0xd8
clones/prisma-examples/go/graphql/vendor/github.com/99designs/gqlgen/handler.GraphQL.func1(0x14ebe80, 0xc0003a4000, 0xc000288800)
/Users/alex/go/src/clones/prisma-examples/go/graphql/vendor/github.com/99designs/gqlgen/handler/graphql.go:255 +0x562
net/http.HandlerFunc.ServeHTTP(0xc00012d290, 0x14ebe80, 0xc0003a4000, 0xc000288800)
/usr/local/Cellar/go/1.11.2/libexec/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0x17c3e40, 0x14ebe80, 0xc0003a4000, 0xc000288800)
/usr/local/Cellar/go/1.11.2/libexec/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc00013e5b0, 0x14ebe80, 0xc0003a4000, 0xc000288800)
/usr/local/Cellar/go/1.11.2/libexec/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc0001600a0, 0x14ec140, 0xc0000b4240)
/usr/local/Cellar/go/1.11.2/libexec/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
/usr/local/Cellar/go/1.11.2/libexec/src/net/http/server.go:2851 +0x2f5
prisma deploy
~/g/s/c/p/g/graphql > prisma deploy
Creating stage default for service default ✔
Deploying service `default` to stage `default` to server `local` 447ms
Changes:
User (Type)
+ Created type `User`
+ Created field `id` of type `GraphQLID!`
+ Created field `email` of type `String!`
+ Created field `name` of type `String`
+ Created field `posts` of type `[Relation!]!`
+ Created field `updatedAt` of type `DateTime!`
+ Created field `createdAt` of type `DateTime!`
Post (Type)
+ Created type `Post`
+ Created field `id` of type `GraphQLID!`
+ Created field `createdAt` of type `DateTime!`
+ Created field `updatedAt` of type `DateTime!`
+ Created field `published` of type `Boolean!`
+ Created field `title` of type `String!`
+ Created field `content` of type `String`
+ Created field `author` of type `Relation!`
PostToUser (Relation)
+ Created relation between Post and User
Applying changes 1.1s
Hooks:
Seeding based on seed.graphql 1.0s
Your Prisma GraphQL database endpoint is live:
HTTP: <http://localhost:4466>
WS: <ws://localhost:4466>
post-deploy:
Generating schema... 22ms
Running prisma generate...
Saving Prisma Client (Go) at /Users/alex/go/src/clones/prisma-examples/go/graphql/prisma-client/
Running prisma generate ✔
nikolasburk
11/29/2018, 8:57 AMPost : unsupported protocol scheme ""
is there because the DefaultEndpoint
has not been set in the generated prisma-client/prisma.go
file. You should be able to fix this by running prisma generate
(but ensure that prisma deploy
has been performed successfully before and the endpoint
in your prisma.yml
is set). When running prisma generate
, the CLI checks your prisma.yml
and sets the endpoint
from it as the DefaultEndpoint
in the generated prisma-client/prisma.go
.