hmm in the current prisma cli 1.8 … ist it just me...
# orm-help
t
hmm in the current prisma cli 1.8 … ist it just me or are the boilerplates gone 😄?
n
You’ll want to use
graphql-cli
now 🙂
t
yes found that sadly its not working getting a bunch of errors when trying to yarn dev
n
Could you post your package.json over on the forum?
n
can you share some of the bunch of errors? 😄
t
yes 😄
fast parrot 1
its in the gist
basically i did int a typescript-advanced project
did a prisma deploy inside the database folder using a local docker version
n
so you did
graphql create
, then choose
typescript-advance
?
t
and try to boot the server up with yarn dev
graphql create backend --boilerplate typescript-advanced
n
looks like someone ran into the same issue and found a solution
I couldn't reproduce the problem 🙂
t
humm
running node 10.1
i used the creation wizard of graqhql running into alot of problems regarding npm-run-all and dotenv
wich havent been installed
but in the end its the same errors
n
would be great if you can chime in on the Github issue so we can learn more about the problem 🙂 I'm curious to hear the solution, and to see if it fixes your problems as wlel
t
yes sure
👍 1
oh boys the react template wont work as well ^^its booting up but i cant create users 😄 Error: Field “createUser” of type “User!” must have a selection of subfields. Did you mean “createUser { ... }“?
caused buy the signup mutation
n
t
b4 doing that
i did
graphql create …
used that template
went to the database directory initialized it to my docker version and yarn dev / started everything up
did i miss something here?
n
no
that looks like a bug in the signup mutation 🙂
t
why am i running into bugs everytime i wanna tryout some stuff xD
n
@Till what's the exact mutation you run to receive that error?
t
mutation { signup(email:“test@test.com”,name“test”,password“test1234”) { token } }
thats inside the app playground
i can however create a user when invoking the correct mutation against the backend (createUser(data: {…}) { id }
so it seems to be an issue with the generated stuff from the prisma-bindings
i mean what prisma is trying to fire against the db gql server
n
what's the raw query printed to stdout?
t
theres nothing printed ( or you need to tell me where to find it)
{ email: ‘test@test.com’, password: ‘$2a$10$6xDWygtth9XJPH.ZkzHiB..AsRDTobH9MOcGtprmxfej4RVlq./6u’, name: ‘test’ }
thats what gets put into the data field
then the query + query variables should be printed to your terminal (stdout)
when you send a query to your GraphQL Server
(not the Prisma API directly)
t
{“operationName”null,“variables”{},“query”:“mutation {\n signup(email: \“test@test.com\“, name: \“test\“, password: \“test1234\“) {\n token\n }\n}\n”}
thats the payload send from the playground
n
I am asking about the raw query + variables to the Prisma API, which is printed by your GraphQL server 🙂
t
from what this error in general tells me is that when the app server sends the createUser mutation to the db server that request is malformed missing at least a subfield that it wants to grab from that mutation
n
I agree! 🙂 I want to make sure by looking at the actual query.
t
np sitting in a hotel in thailand toying with prisma xD its raining so i got time
n
😂
unexpected!
t
well, soon to be back in germany… hope weather is a little bit more nice there
I documented the problem here, will give it a look later 🙂
t
okay ty
ill give the node-advanced template a try and see if that one works for me
still got some faith
n
🙏
t
emojis should be considerd one of the apocalyptic riders >_>
yay! node template works 😄
…wait that is using the cloud right now …
okay works locally. so its indeed a weird problem with the react template
or even connected to that typescript issue
n
I don't think the two issues are connected 🙂
t
well the only difference is that the one is typescript whereas the other one is in plain js
i wasnt even using the react part from the template
just the playground
i have been using to invoke stuff
(since the react app gave me the exact same error)
n
I am aware of two different errors you mentioned: - typescript boilerplate: typescript compiler errors (I am not able to reproduce) - react boilerplate: problem with signup mutation (I created an issue and will take a look later) Did I miss something?
t
nope
still trying to figure out if the errors are on my end :S
n
I'm pretty sure 1) is caused by something in your environment, where as 2) is a general issue.
t
well, will focus on getting #1 fixed
👍 1
okay fixed issue one but it was kinda strange
i had to the generated prisma.ts caused the issue
also one thing the docs (well or me) was missing is how to actually deploy the database backend since the prisma.yml from the database folder from the templates rely on some environmental variables that is set in .env also alot of packages dont get installed
had to (the cli stated just to use cd .. / yarn start) wich wasnt working because no packages were installed so far
the cli messaged is missing a npm/yarn install 🙂
but maybe thats just because of my node 10 version wich doesnt seem to be supported by yarn
n
@Till looks like the
prisma.ts
which is already part of the repository is outdated. Can you regenerate it and provide a PR with the new one? 🙂
t
yes
the typescript one right
n
yup