By implementing server with graphql-yoga and graph...
# prisma-whats-new
l
By implementing server with graphql-yoga and graphcool@beta and making requests to server endpoint, not to the graphcool endpoint directly how to work with Apollo on client side (Angular)? Previously I was sending requests like:
Copy code
this.apollo.mutate({ mutation: 
  mutation Login($email: String!, $password: String!) {
    login(email: $email, password: $password) {
      token
    }
  }
, variables: 
  {
    email: "x",
    password: "x"
  }
 })
and now for endpoint to work I should send query like
Copy code
"mutation {
  login(email: "x", password: "x") {
		token
  }
}"
What is the best approach now to work with?
n
I don't understand your question, can you elaborate?
l
Iā€™m trying to migrate the project from v0.11 of graphcool to beta. In beta boilerplates are using GrapQLServer and then applications are using this server instead of connecting directly to graphcool enpoints, is that correct? Then front-end (Angular) is making requests to this server. Now the first code presents the older way of sending requests by Apollo and my quesiton is how to gracefully adapt queries/Apollo for the GraphQLServer approach
n
I see, that's a great question! could you ask it in the Forum so I can reply there? šŸ™‚
l
Sure, in a few minutes
n
thanks šŸ‘