<@U8DT7MZFD> maybe you're passing in undefined to ...
# prisma-whats-new
m
@Maxime Scibetta maybe you're passing in undefined to
vote(id)
? Also try changing
Copy code
variables(){
          return{
            id: this.voteId
            
          }
        }
to
variables: { id }
m
Yes is it this .... But what's the difference ?
And you know why i can't do this
Copy code
apollo: {
   projects:{
       query: MY_QUERY,
       update(data){
        // my code
      }
  } 
}
obligatory do this ->
Copy code
methods: {
    get(){
      client.query({
        query: GET_PROJECTS,
      }).then(result => {
          this.projects = result.data.projects;
      })
    },
  },
  created(){
    this.get()
  }
m
I'm sure I follow. The
client
needs a
variables
object with the necessary arguments. I've never seen a function being used like that. you could try
variables: () => {return {id: this.voteId}}
but not sure why you would do that over
variables: { id }
I don't understand your second question