Has anyone had a problem with graphql-yoga and pri...
# orm-help
j
Has anyone had a problem with graphql-yoga and prisma and not being able to run any schema queries? See this issue: https://github.com/prisma/graphql-yoga/issues/561 Am absolutely baffled!!!
j
@JamesJ can you see User data when you visit Prisma Admin?
j
@Jonathan I spin up and visit http://localhost:4000/_admin and get a white screen with the message “Cannot GET /_admin”
Interesting. If I visit https://eu1.prisma.sh/public-prisma-yoga-example-js/prisma/dev/_admin there are only tables for Tweet and Location ! That must be why! What is more perplexing is that even without a data model I should be able to use graphql-yoga server to query a resolver to just return data without going near prisma and that isn’t working either. Am going to set something up in the sample to see if this flies.
Quick query against the demo endpoint and this: { “data”: null, “errors”: [ { “message”: “Cannot query field ‘Tweet’ on type ‘Query’. Did you mean ‘tweet’ or ‘tweets’? (line 2, column 3):\n Tweet {\n ^“, “locations”: [ { “line”: 2, “column”: 3 } ] } ] }
I think the examples are out of date. Just tried the new examples with nexus-prisma and these work fine. Thanks for help 🙂
j
👍
You won’t see the Admin interface on 4000...that’s your yoga server.
j
Solved it! You pointed out the problem @Jonathan. In my .env my PORT setting was also 4466 so my localhost Prisma and graphql-yoga were trying to go out on the same port. Once I set graphql-yoga back to use PORT 4000 and went into playground I got my schema.graphql yoga queries back! Thanks again.
j
👍