Entrepreneur3
09/15/2018, 4:06 PMnode index.js
GraphQLError: Syntax Error: Cannot parse the unexpected character ".".
Entrepreneur3
09/15/2018, 4:07 PMEntrepreneur3
09/15/2018, 4:26 PMEntrepreneur3
09/15/2018, 4:29 PMconst server = new GraphQLServer({
typeDefs: './schema.graphql', <-- This line invokes the syntax error for some reason..
resolvers,
context: {
prisma
},
})
server.start(() => console.log('Server is running on <http://localhost:4000'>))
Entrepreneur3
09/15/2018, 4:31 PMalec
09/15/2018, 4:36 PMcolburn
09/15/2018, 6:21 PMcolburn
09/15/2018, 6:22 PMabhiaiyer
09/15/2018, 6:56 PMabhiaiyer
09/15/2018, 6:57 PMcolburn
09/15/2018, 7:14 PMiago
09/15/2018, 8:05 PMconst chunks = function(array, size) {
let results = []
while (array.length) {
results.push(array.splice(0, size))
}
return results
}
const inserted = []
for (const chunk of chunks(arr_X_data, 30)) { // eslint-disable-line no-loops/no-loops
inserted.concat(
await Promise.all( // eslint-disable-line no-await-in-loop
chunk.map(
(data)=> prisma.mutation.createX({ data })
)
)
)
}
Luke
09/16/2018, 3:08 AMgenerate is not a prisma command.
from the post deploy hook in prisma.yml
?Luke
09/16/2018, 3:10 AM➜ lyra-api prisma deploy
Deploying service `default` to stage `default` to server `local` 79ms
Service is already up to date.
post-deploy:
▸ generate is not a prisma command.
▸ Perhaps you meant cluster-token
▸ Run prisma help for a list of available commands.
Get in touch if you need help: <https://www.prisma.io/forum/>
To get more detailed output, run $ export DEBUG="*"
Running prisma generate ✖
➜ lyra-api prisma | grep generate
generate Generate a schema or Prisma Bindings
➜ lyra-api
Luke
09/16/2018, 3:11 AMabhiaiyer
09/16/2018, 4:40 AMNick
09/16/2018, 11:22 AMmaxhogervorst
09/16/2018, 8:32 PMch3ckmat3
09/16/2018, 9:09 PMschema = ""
trick.Vanna
09/17/2018, 4:52 AMVanna
09/17/2018, 4:52 AMkratam
09/17/2018, 8:21 AMprisma-binding
, how can we use extractFragmentReplacements
? Which package exports it?Moritz
09/17/2018, 8:47 AMgroups(parent, args, ctx, info) {
// pass the query params to the client
}
? should I simply stick to the $delegate
option like mentioned in @lawjolla migration guide, or is it intended to be used with the $request(query)
options from the docs? Whats the way to go?Moritz
09/17/2018, 12:16 PMErrorname
09/17/2018, 2:18 PMprisma-binding
.
I agree that Prisma Client is a great piece of software and really useful, but I feel like it doesn't apply for the use case where your frontend is using graphql to discuss with your backend.
I think that prisma binding is a top notch tool for this kind of use, and therefore should stay in the documentation, next to the Prisma Client.
What do you think?kratam
09/17/2018, 2:28 PMprisma-binding
. A few questions:
- My resolvers use fragment:
props. Should I import extractFragmentReplacements
from graphql-binding
from now on?
- I'm using typescript and prisma.user({ id: userId }).$fragment(fragment)
seems to return {}
. What am I doing wrong? (fragment
is a string)
- Is it possible to pass the info
to the prisma query in order to retrieve connections? The $delegate seems to be gone from prisma
.
- Is there a 1.16 => 1.17 migration guide?jdoyle112
09/17/2018, 3:47 PMjdoyle112
09/17/2018, 3:48 PMjdoyle112
09/17/2018, 3:50 PM