Simon Rycroft
12/20/2018, 4:17 PM{
"data": null,
"errors": [
{
"message": "Post : unsupported protocol scheme \"\"",
"path": [
"feed"
]
}
]
}
Any ideas?nikolasburk
nikolasburk
Simon Rycroft
12/20/2018, 4:22 PMnikolasburk
Simon Rycroft
12/20/2018, 4:24 PMnikolasburk
prisma deploy if you still have it? It should look similar to this:
$ prisma deploy
Creating stage dev for service prisma β
Deploying service `prisma` to stage `dev` to server `prisma-eu1` 147ms
Changes:
User (Type)
+ Created type `User`
+ Created field `id` of type `ID!`
+ Created field `email` of type `String!`
+ Created field `name` of type `String`
+ Created field `posts` of type `[Post!]!`
+ Created field `updatedAt` of type `DateTime!`
+ Created field `createdAt` of type `DateTime!`
Post (Type)
+ Created type `Post`
+ Created field `id` of type `ID!`
+ 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 `User!`
PostToUser (Relation)
+ Created relation between Post and Post
Applying changes 1.3s
Hooks:
Seeding based on seed.graphql 19.6s
Your Prisma GraphQL database endpoint is live:
HTTP: <https://eu1.prisma.sh/nikolas/prisma/dev>
WS: <wss://eu1.prisma.sh/nikolas/prisma/dev>
post-deploy:
Generating schema... 21ms
Running prisma generate...
Saving Prisma Client (Go) at /Users/nikolasburk/go/src/github.com/prisma/prisma-examples/go/graphql/prisma-client/
Running prisma generate βnikolasburk
var DefaultEndpoint is set in prisma.gonikolasburk
prisma.go) might not have been generated after prisma deploy for some reason. That's why DefaultEndpoint might be empty which leads to that error.Simon Rycroft
12/20/2018, 4:33 PMnikolasburk
Simon Rycroft
12/20/2018, 4:40 PMSimon Rycroft
12/20/2018, 4:40 PMSimon Rycroft
12/20/2018, 4:42 PMSimon Rycroft
12/20/2018, 4:42 PMnikolasburk
nikolasburk
Simon Rycroft
12/20/2018, 4:43 PMnikolasburk
nikolasburk
Simon Rycroft
12/20/2018, 4:44 PMnikolasburk
version: '3'
services:
prisma:
image: prismagraphql/prisma:1.23
restart: always
ports:
- "4466:4466"
environment:
PRISMA_CONFIG: |
port: 4466
databases:
default:
connector: mysql
host: mysql
port: 3306
user: root
password: prisma
migrations: true
mysql:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: prisma
volumes:
- mysql:/var/lib/mysql
volumes:
mysql:nikolasburk
docker-compose up -d to launch the local Prisma server and the database.nikolasburk
Simon Rycroft
12/20/2018, 4:45 PMnikolasburk
docker ps and paste the output here please.Simon Rycroft
12/20/2018, 4:46 PMCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8af558805885 prismagraphql/prisma:1.23 "/bin/sh -c /app/staβ¦" 44 seconds ago Up 42 seconds 0.0.0.0:4466->4466/tcp graphql_prisma_1
2877f9c4e4ab mysql:5.7 "docker-entrypoint.sβ¦" 44 seconds ago Up 42 seconds 3306/tcp, 33060/tcp graphql_mysql_1nikolasburk
nikolasburk
go/graphql example right? Can you navigate into that and then run prisma deploy again.Simon Rycroft
12/20/2018, 4:47 PMSimon Rycroft
12/20/2018, 4:48 PMnikolasburk
Simon Rycroft
12/20/2018, 4:48 PMnikolasburk
Simon Rycroft
12/20/2018, 4:48 PMnikolasburk
<http://localhost:4466/> as the endpoint in prisma.ymlnikolasburk
prisma deploy againSimon Rycroft
12/20/2018, 4:49 PMprisma-examples/go/graphqlnikolasburk
graphql/prismaSimon Rycroft
12/20/2018, 4:49 PMSimon Rycroft
12/20/2018, 4:50 PMnikolasburk
nikolasburk
Simon Rycroft
12/20/2018, 4:52 PMnikolasburk
DefaultEndpoint in prisma.go is set?nikolasburk
prisma deploy command output?
post-deploy:
Generating schema... 21ms
Running prisma generate...
Saving Prisma Client (Go) at /Users/nikolasburk/go/src/github.com/prisma/prisma-examples/go/graphql/prisma-client/
Running prisma generate βSimon Rycroft
12/20/2018, 4:53 PMnikolasburk
endpoint in prisma.yml I asked you to rerun prisma deploySimon Rycroft
12/20/2018, 4:54 PMSimon Rycroft
12/20/2018, 4:55 PMnikolasburk
Simon Rycroft
12/20/2018, 4:57 PMnikolasburk
nikolasburk
Simon Rycroft
12/20/2018, 4:59 PMnikolasburk
nikolasburk
Simon Rycroft
12/20/2018, 5:00 PMSimon Rycroft
12/20/2018, 5:04 PMSimon Rycroft
12/20/2018, 5:05 PMprisma init --endpoint <http://localhost:4466>Simon Rycroft
12/20/2018, 5:05 PMprisma deploy --forceSimon Rycroft
12/20/2018, 5:06 PMSimon Rycroft
12/20/2018, 5:07 PMSimon Rycroft
12/20/2018, 5:07 PMSimon Rycroft
12/20/2018, 5:08 PMnikolasburk
4466 is not the one exposed by the Go GraphQL server - it's the underlying Prisma API that gets consumed by the Prisma Go client in the GraphQL resolvers.nikolasburk
nikolasburk
4466 exposes full CRUD operations while your Go GraphQL server exposes only those operations defined in schema.graphqlSimon Rycroft
12/21/2018, 1:46 PM