I used "npm install -g graphcool@next" to do the V...
# prisma-whats-new
I used "npm install -g graphcool@next" to do the Vue.js getting started tutorial. When I click on the playground link in the console I get a sort of loading blinker... I can launch the playground from the CLI I can't seem to get any of the queries to work In my types.graphql I have: type Person @model { id: ID! @isUnique firstName: String! } Yet in the playground that I open from the CLI I have tried { Person { firstName } } and it returns { "data": null, "errors": [ { "message": "Cannot query field 'Person' on type 'Query'. (line 2, column 3):\n Person {\n ^", "locations": [ { "line": 2, "column": 3 } ] } ] } I have pushed my changes up to the graph.cool server via: graphcool deploy --target prod Thanks for any advice!
The query would be
allPersons { firstName }
Person(id: "...") { firstname }
In the Playground, there is a DOCS tab on the right, that will show you all available queries and mutations
Thanks - but { allPersons { firstName } } returns { "data": null, "errors": [ { "message": "Cannot query field 'allPersons' on type 'Query'. (line 2, column 3):\n allPersons {\n ^", "locations": [ { "line": 2, "column": 3 } ] } ] }
Please check the DOCS tab. If it's not there, you might be in the wrong project?
I checked and the ID at the end of the URL: https://api.graph.cool/simple/v1/ ID HERE is the same as the value in my graphcoolrc file: targets: prod: shared-ap-northeast-1/SAME ID HERE default: prod
Okay, so that's good. So what does the DOCS tab say?
I see a green "Schema" tab on the far right but no docs...
The Schema tab only has node(...): Node
I just switched to a project I created through the UI and the docs tab is there..
Ow, they renamed it to SCHEMA 😄 Lol, used to be DOCS all the time
well... is it?:)
I see docs in the other project!
Remember this is a project I made through the cli using the @beta
It says 'DOCS' in the Playground in the Console, and 'SCHEMA' on the standalone playground found at your endpoint
But apparently, something did not go okay with the deployment
As you say the SCHEMA tab does not contain any types other than node
Did you get any errors during deployment?
What does your graphcool.yml look like?
Deploying to shared-ap-northeast-1 with target prod... 5.1s Success! Here is what changed: Types Person + A new type with the name
is created. └─ + A new field with the name
and type
is created.
No errors
I can add a person through the data tab on the UI
Then I still think you don't have the right Playground open
Can you doublecheck
Because if the data browser works, the deployment was successful
OK - I ran the graphcool playground command from the server directory (the same one where I ran the deploy)
OK - will check again
Yes, but you deployed specifying a target
graphcool playground
opens your default project
Can you try
graphcool playground --target prod
Aha! Thank you so much! I'm sorry I missed that. Everyone here has been so helpful!
👍🏻 1
No worries, serviceId's are not the most obvious things to notice, they're not that readable