Jim
05/08/2018, 2:06 PMandre
05/08/2018, 2:07 PMprisma init
generates a local docker-compose.yml
which you can use to spin up your local instance via docker-compose up --build -d
Jim
05/08/2018, 2:35 PMandre
05/08/2018, 2:39 PMdocker-compose.yml
hasn't been prepared for this boilerplate yet. You could run prisma init
in a temporary directory and copy the generated docker-compose.yml
over to your project.andre
05/08/2018, 2:40 PMdocker-compose up --build -d
and then switch into the server/database
directory and execute prisma deploy
there.Jim
05/08/2018, 2:56 PMJim
05/08/2018, 2:57 PMandre
05/08/2018, 2:58 PMJim
05/08/2018, 3:01 PMandre
05/08/2018, 3:02 PMprisma deploy
in server/database
?Jim
05/08/2018, 3:04 PMdefault
to stage default
to server local
36ms
Service is already up to date.
post-deploy:
Running graphql get-schema --project database ✔️
project database - No changesandre
05/08/2018, 3:04 PMandre
05/08/2018, 3:05 PMJim
05/08/2018, 3:05 PMJim
05/08/2018, 3:05 PMJim
05/08/2018, 3:06 PMJim
05/08/2018, 3:06 PMJim
05/08/2018, 3:06 PMJim
05/08/2018, 3:06 PMandre
05/08/2018, 3:07 PMJim
05/08/2018, 3:09 PMandre
05/08/2018, 3:12 PMJim
05/08/2018, 3:13 PMandre
05/08/2018, 3:14 PMJim
05/08/2018, 3:15 PMJim
05/08/2018, 3:15 PMandre
05/08/2018, 3:16 PMJim
05/08/2018, 3:16 PMJim
05/08/2018, 3:16 PMBearer ${tokenValue}
: ‘’,
},
})
return forward(operation)
})
// authenticated httplink
const httpLinkAuth = middlewareLink.concat(httpLink)
const wsLink = new WebSocketLink({
uri: <ws://localhost:4000>
,
options: {
reconnect: true,
connectionParams: {
Authorization: Bearer ${localStorage.getItem(AUTH_TOKEN)}
,
},
},
})
const link = split(
// split based on operation type
({ query }) => {
const { kind, operation } = getMainDefinition(query)
return kind === ‘OperationDefinition’ && operation === ‘subscription’
},
wsLink,
httpLinkAuth,
)
// apollo client setup
const client = new ApolloClient({
link: ApolloLink.from([link]),
cache: new InMemoryCache(),
connectToDevTools: true,
})
const token = localStorage.getItem(AUTH_TOKEN)
ReactDOM.render(
<ApolloProvider client={client}>
<RootContainer token={token} />
</ApolloProvider>,
document.getElementById(‘root’),
)Jim
05/08/2018, 3:18 PMandre
05/08/2018, 3:20 PMconst httpLink = new HttpLink({ uri: ‘<http://localhost:4000>' })
- This is not the Prisma service, but your GraphQL API. The error above can't be thrown in that case.andre
05/08/2018, 3:20 PMconst httpLink = new HttpLink({ uri: ‘<http://localhost:4466/default/default>' })
would be the correct endpoint if you want to communicate with the Prisma service directly.Jim
05/08/2018, 3:21 PMJim
05/08/2018, 3:22 PMandre
05/08/2018, 3:23 PMandre
05/08/2018, 3:23 PMJim
05/08/2018, 3:23 PMandre
05/08/2018, 3:24 PMJim
05/08/2018, 3:24 PMandre
05/08/2018, 3:25 PMandre
05/08/2018, 3:26 PMJim
05/08/2018, 3:27 PMJim
05/08/2018, 3:27 PMJim
05/08/2018, 3:27 PMJim
05/08/2018, 3:27 PMandre
05/08/2018, 3:28 PMandre
05/08/2018, 3:28 PMconst httpLink = new HttpLink({ uri: '<http://localhost:4466/default/default>' })
.andre
05/08/2018, 3:29 PMJim
05/08/2018, 3:30 PMandre
05/08/2018, 3:30 PMJim
05/08/2018, 3:30 PMJim
05/08/2018, 3:31 PMJim
05/08/2018, 3:31 PMJim
05/08/2018, 3:31 PMandre
05/08/2018, 3:31 PMJim
05/08/2018, 3:31 PMJim
05/08/2018, 3:32 PMandre
05/08/2018, 3:32 PMandre
05/08/2018, 3:33 PMJim
05/08/2018, 3:34 PMJim
05/08/2018, 3:35 PMandre
05/08/2018, 3:37 PMprisma-binding
. This should be configured to use the Prisma service endpoint.andre
05/08/2018, 3:38 PMandre
05/08/2018, 3:38 PMconst httpLink = new HttpLink({ uri: '<http://localhost:4000>' })
Jim
05/08/2018, 3:39 PMJim
05/08/2018, 3:39 PMJim
05/08/2018, 3:39 PMJim
05/08/2018, 3:40 PMandre
05/08/2018, 3:40 PMJim
05/08/2018, 3:49 PMJim
05/08/2018, 3:49 PMJim
05/08/2018, 3:52 PMandre
05/08/2018, 3:54 PMJim
05/08/2018, 3:55 PMnilan
05/08/2018, 4:53 PMJim
05/09/2018, 4:01 AMandre
05/09/2018, 6:44 AM