fullstack-tutorial
fullstack-tutorial copied to clipboard
Wrong order of the actions performed in the tutorial
i believe in https://www.apollographql.com/docs/tutorial/production.html you are showing the wrong order of actions needed to properly deploy the apollo service to the engine.
To set up a service we need to provide endpoint. I assume this endpoint should be coming from Zeit Now. Yet deployment of the service to Now is described further down the road. Wouldn't it make more sense to describe it first and then go to deploying the service to the engine?
Ok my bad, you don't need Zeit account to follow through tutorial. But this makes me think, why is tutorial mentioning deployoment to the serverless at all? We send queries from client to localhost in the next section, so what's the point?
I'm having an issue with the Check and publish with the Apollo CLI step. Receiving a Error: No service found to link to Engine
. Anyone have ideas?
I'm having an issue with the Check and publish with the Apollo CLI step. Receiving a
Error: No service found to link to Engine
. Anyone have ideas?
I have the same issue, there is a same issue here: [https://github.com/apollographql/apollo/issues/239]
I just had the same issue, and then stupidly realized I hadn't copied in the whole key. I only added the hash at the end to the ENGINE_API_KEY
value in the .env
file.
So, don't make the stupid mistake I did please. The .env
file entry should look like this:
ENGINE_API_KEY=service:<service-name>:<hash-made-by-apollo-engine>
The push to Apollo Engine worked perfectly after that.
Actually, I've also made an addition to the docs too. The description is wrong.
Scott
I still think this issue is valid.
I'm confused by the whole Apollo Engine thing ... do I need two different services w/i Engine, one for development and one for production? Presumably so, since you'd want to differentiate usage across those use cases. But it's also questionable to me why you'd want your local dev stuff in Engine at all.
The tutorial is mismatched; it says to "deploy to Now", but then says push the schema engine using localhost:4000
.
It's really confusing.
Yeah, @jeffreywescott. I was mixing two issues into this one.
I agree. The whole bit about adding the schema to Engine and uploading/ publishing the API to zeit.co is misplaced. They are both useful, but for the tutorial, they might be better off at the end, as neither are really necessary.
Scott
@smolinari really?
But the Engine example explicitly suggests using localhost:4000
for the endpoint. So ... is Engine not needed for development? Can I tell code running locally to bypass it somehow?
@jeffreywescott - Nope. You don't need Engine to develop a GraphQL system at all. It's a supplementary set of services, which help you with development of a GraphQL system, but it most definitely isn't necessary.
Scott
Thanks. I wish the engine docs made more sense. The truth is that the whole "development vs. production" thing makes it really confusing. For example, it is only production servers that send data to engine? If so, how does the server know? NODE_ENV
? If not, how does data from development not "clutter up" the "real" data that engine is meant to be tracking?
Engine seems cool. And I'd like to try it, but until it's better documented, I think I'll just avoid it. I'd recommend removing it from the tutorial, as well, or at least explaining things better. Bonus points if the aforementioned engine docs also get updated.
Update: these other docs show how to turn on engine in a server. TL;DR -- if the ENGINE_API_KEY
isn't set, and you don't explicitly pass an apiKey
when initializing the server, Engine metrics won't be sent.