https://serverless-stack.com/ logo
#help
Title
# help
j

Jared Burke

12/21/2021, 11:07 PM
Hey hey 👋 Moving over from serverless framework, I'm having an issue running an Apollo GraphQL API locally via
sst start
. I'm using
sst.ApolloApi
, essentially the exact example here. The response from my lambda is a
404
, and when attempting to load the endpoint in browser, I get:
Cannot GET /
Any hints?
f

Frank

12/22/2021, 4:52 AM
Hey @Jared Burke do you see any error in the
sst start
terminal output?
I just gave the example a try.. starting from scratch.. seems to work
j

Jared Burke

12/22/2021, 5:14 AM
@Frank that's a negative.
Copy code
(outputs above this don't show any errors)
==========================
 Starting Live Lambda Dev
==========================

Debug session started. Listening for requests...
8c76df73-25d3-4cf8-9ea3-70b39a4d0c58 REQUEST local-mp-federation-sst-a-AuthServiceLambdaGETF615-Q1O3s6LCNUfM [services/auth/server.handler] invoked by API GET /
Enabling inline tracing for this federated service. To disable, use ApolloServerPluginInlineTraceDisabled.
8c76df73-25d3-4cf8-9ea3-70b39a4d0c58 RESPONSE {"statusCode":404,"body":"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n<... 39 more characters","multiValueHeaders":{"x-powered-by":["Express"],"content-security-policy":["default-src 'none'"],"x-content-type-options":["nosniff"],"content-type":["text/html; charset=utf-8"],"content-length":["139"]},"isBase64Encoded":false}
f

Frank

12/22/2021, 5:15 AM
Hmm… the error seems to come from Apollo server
Btw did u make any changes to the example?
j

Jared Burke

12/22/2021, 5:16 AM
Sorry, I'm an idiot
I had a path specified in the server definition, and carried over the example project (which didn't specify a path)
f

Frank

12/22/2021, 5:17 AM
Ah haha.. is it working w/ the right path?
j

Jared Burke

12/22/2021, 5:19 AM
Yep, lol
f

Frank

12/22/2021, 5:19 AM
Nice!
j

Jared Burke

12/22/2021, 5:19 AM
Sometimes just gotta come back with fresh eyes I guess
Thanks for the help 😛
f

Frank

12/22/2021, 5:19 AM
np 👍
j

Jared Burke

12/22/2021, 5:19 AM
Really awesome product btw