wesbos
05/10/2018, 3:16 PMpettanko
05/10/2018, 3:17 PMharmony
05/10/2018, 3:21 PMwesbos
05/10/2018, 3:21 PMdrk
05/10/2018, 4:59 PMendpoint: <https://eu1.prisma.sh/${env:PRISMA_CLUSTER}/${env:PRISMA_STAGE}>
valid in prisma.yml or should i go w/ the defaults and use <https://eu1.prisma.sh/>
picosam
05/10/2018, 5:19 PMException in thread "main" java.lang.RuntimeException: Unable to load Prisma config: com.prisma.config.InvalidConfiguration: Expected hash under 'databases' to be non-empty
at scala.sys.package$.error(package.scala:27)
at com.prisma.config.ConfigLoader$.load(ConfigLoader.scala:38)
at com.prisma.local.PrismaLocalDependencies.<init>(PrismaLocalDependencies.scala:39)
at com.prisma.local.PrismaLocalMain$.delayedEndpoint$com$prisma$local$PrismaLocalMain$1(PrismaLocalMain.scala:15)
at com.prisma.local.PrismaLocalMain$delayedInit$body.apply(PrismaLocalMain.scala:12)
at scala.Function0.apply$mcV$sp(Function0.scala:34)
at scala.Function0.apply$mcV$sp$(Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App.$anonfun$main$1$adapted(App.scala:76)
at scala.collection.immutable.List.foreach(List.scala:389)
at scala.App.main(App.scala:76)
at scala.App.main$(App.scala:74)
at com.prisma.local.PrismaLocalMain$.main(PrismaLocalMain.scala:12)
at com.prisma.local.PrismaLocalMain.main(PrismaLocalMain.scala)
I seem to have found a similar issue on the forums but with no answer really.
@nilan do you happen to have a clue?bobbyt
05/10/2018, 5:44 PMtomhut
05/10/2018, 5:53 PMbobbyt
05/10/2018, 6:08 PMHoracio
05/10/2018, 7:32 PM✔ ⮀ …/database ⮀ @master ● ? ⍟2 ⮀ prisma deploy
config CWD /Users/horacio.gutierrez/FullstackAcademy/1802-FSA-RM-Library/GraphQL/hackernews-node/database +0ms
config HOME /Users/horacio.gutierrez +2ms
config definitionDir /Users/horacio.gutierrez/FullstackAcademy/1802-FSA-RM-Library/GraphQL/hackernews-node/database +0ms
config definitionPath /Users/horacio.gutierrez/FullstackAcademy/1802-FSA-RM-Library/GraphQL/hackernews-node/database/prisma.yml +0ms
cli { isGlobal: true } +0ms
StatusChecker setting status checker +0ms
cli command id deploy +4ms
cli:plugincache Got plugin from cache +0ms
cli:plugincache /Users/horacio.gutierrez/Library/Caches/prisma/plugins.json +1ms
cli:plugincache Got plugin from cache +1ms
cli:plugincache /Users/horacio.gutierrez/Library/Caches/prisma/plugins.json +0ms
plugins findCommand prisma-cli-core +0ms
plugin requiring command +0ms
cli-engine:plugins:manager requiring /usr/local/lib/node_modules/prisma/node_modules/prisma-cli-core +0ms
portfinder:defaultHosts exports._defaultHosts is: [ '0.0.0.0', '127.0.0.1', '::1', 'fe80::1', 'fe80::1402:f497:2c57:7c56', '10.0.4.8', 'fe80::ecac:d9ff:fe52:1d6f', 'fe80::3260:347b:fdb:1739', 'fe80::bf49:86c3:bdd:693c', 'fe80::5c48:c0b5:f1da:536f', 'fe80::aede:48ff:fe00:1122' ] +0ms
cli-engine:plugins:manager required +602ms
plugin required command +604ms
StatusChecker setting status checker +654ms
TypeError: Cannot read property 'custom' of undefined
at Object.<anonymous> (/usr/local/lib/node_modules/prisma/node_modules/prisma-yml/src/yaml.ts:35:21)
at step (/usr/local/lib/node_modules/prisma/node_modules/prisma-yml/dist/yaml.js:40:23)
at Object.next (/usr/local/lib/node_modules/prisma/node_modules/prisma-yml/dist/yaml.js:21:53)
at fulfilled (/usr/local/lib/node_modules/prisma/node_modules/prisma-yml/dist/yaml.js:12:58)
at <anonymous>
Exiting with code: 1
Horacio
05/10/2018, 7:33 PMKumar
05/10/2018, 7:36 PMtz
05/10/2018, 9:34 PMprisma-binding 2.0
, got a problem: when I do ctx.db.exists.User({ email: <mailto:test@test.com|test@test.com> })
, it returns all the users in the database.tz
05/10/2018, 9:34 PMjakethrog
05/10/2018, 10:47 PMryanmagoon
05/11/2018, 1:09 AMresetStore()
before my auth token has a chance to update on login. I imagine this is a common problem
if I do a setTimeout
wrapping around resetStore
after the login for a second or so I get my app to kick me to the home screen after login, but without it I just stay on the login screen and I only get to the home screen after a refresh when it then picks up the token
(I’m on react native)
is there a common pattern for dealing with this?mrboutte
05/11/2018, 1:30 AMprisma init
which then generates .graphqlconfig.yml
, datamodel.graphql
, and prisma.yml
. What are my options for adding a new resolver?ryanmagoon
05/11/2018, 1:34 AMconst { GraphQLServer } = require('graphql-yoga')
const { Prisma } = require('prisma-binding')
const { ApolloEngine } = require('apollo-engine')
const resolvers = require('./resolvers')
const db = new Prisma({
typeDefs: 'src/generated/prisma.graphql', // the auto-generated GraphQL schema of the Prisma API
endpoint: process.env.PRISMA_ENDPOINT, // the endpoint of the Prisma API (value set in `.env`)
debug: true // log all GraphQL queries & mutations sent to the Prisma API
// secret: process.env.PRISMA_SECRET, // only needed if specified in `database/prisma.yml` (value set in `.env`)
})
const server = new GraphQLServer({
typeDefs: './src/schema.graphql',
resolvers,
context: req => ({ ...req, db })
})
ryanmagoon
05/11/2018, 1:34 AMmrboutte
05/11/2018, 1:35 AMError: Directive unique: Couldn't find type unique in any of the schemas.
Otto Jongerius
05/11/2018, 1:36 AMmrboutte
05/11/2018, 1:37 AMconst { GraphQLServer } = require('graphql-yoga');
const { importSchema } = require('graphql-import');
const { ApolloEngine } = require('apollo-engine');
const { Prisma } = require('prisma-binding');
const server = new GraphQLServer({
typeDefs: importSchema('./datamodel.graphql'),
context: req => ({
...req,
db: new Prisma({
endpoint: process.env.PRISMA_ENDPOINT,
debug: true,
}),
}),
});
const port = parseInt(process.env.PORT, 10) || 4000;
if (process.env.ENGINE_API_KEY) {
const engine = new ApolloEngine({
apiKey: process.env.ENGINE_API_KEY,
});
const httpServer = server.createHttpServer({
tracing: true,
cacheControl: true,
});
engine.on('error', err => {
console.log('There was an error starting the server or Engine.');
console.error(err);
// The app failed to start, should probably kill the server
process.exit(1);
});
engine.listen({ port, httpServer, graphqlPaths: ['/'] }, () =>
console.log(
`Server with Apollo Engine is running on <http://localhost:${port}>`,
),
);
} else {
server.start({ port }, () =>
console.log(`Server is running on <http://localhost:${port}`>),
);
}
ryanmagoon
05/11/2018, 1:37 AMryanmagoon
05/11/2018, 1:38 AM@unique
to one of your types in the schema.graphql
?mrboutte
05/11/2018, 1:38 AMryanmagoon
05/11/2018, 1:38 AMdatamodel.graphql
mrboutte
05/11/2018, 1:38 AMryanmagoon
05/11/2018, 1:38 AMryanmagoon
05/11/2018, 1:39 AM@unique
is a special prisma thingmrboutte
05/11/2018, 1:39 AM