<@U3D8LQ8HK> The last line of that chapter, litera...
# prisma-whats-new
g
@nikolasburk The last line of that chapter, literally is: “That’s it! You can now restart the server and send the vote mutation in your app Playground.” Am I supposed to know how format this mutation at this point?
n
Ah! So, you’re talking about the
Applying authentication
chapter 🙂
Am I supposed to know how format this mutation at this point?
At this point, you’re correct that the tutorial implicitly assumes that you know how to write a
vote
mutation! However (and thanks so much for pointing that out), there should definitely be an example for it as this is a step-by-step tutorial that shouldn’t the reader confused!
In general, you can deduct what a mutation looks like from the corresponding field in the GraphQL schema. Here’s an example for the
vote
mutation:
Copy code
mutation {
  vote(linkId: "__SOME_LINK_ID__") {
    id
  }
}
This is what the field in the schema looked like:
Copy code
type Mutation {
  vote(linkId: ID!): Vote
}
vote
is the root field to be used in the mutation and it takes one argument which is the
linkId
of the
Link
you want to submit a vote for 🙂
if you want to get a deeper understanding of that part, I recommend checking out this article: https://blog.graph.cool/graphql-server-basics-the-schema-ac5e2950214e
g
@nikolasburk Thanks for the explanation, example code and reference article. very helpful, I will definitely check them out. 😬
🙌 1