Closed Drilmo closed 1 year ago
Can you provide a repo to reproduce this? Happy to look into it!
Can you provide a repo to reproduce this? Happy to look into it!
@jsjoeio you can use this repo to reproduce : https://github.com/Drilmo/test
Thank you!
So I cloned and ran npm install
:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@data-in-motion%2fauto-changelog - Not found
npm ERR! 404
npm ERR! 404 '@data-in-motion/auto-changelog@^1.0.1' is not in this registry.
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jp/.npm/_logs/2022-10-20T17_17_29_577Z-debug-0.log
Decided to try this and then when i access at localhost:8080/proxy/4000 I see the playground as expected:
Then I added router.yaml
with this:
#
# supergraph: Configuration of the Supergraph server
#
supergraph:
# The path for GraphQL execution
# (Defaults to /)
path: /graphql
and I was still able to access it, using localhost:8080/proxy/4000/graphql
Are you using a relative path?
@jsjoeio sorry for my mistake, for the bug on "npm i" I have push fix (just remove dependance) I don't use Apollo Router because I use Apollo Federation and this sample is a subgraph. it work on my local but not on local of code-server
@jsjoeio I forgot to specify 😅 I am on an EC2 AWS ubuntu but I used the ubuntu installer. Also I am using serverless framework to run lambda, as well as a DynamoDB locally.
@Drilmo ahhh got it! What's the simplest way to run only the Apollo part? That way we can isolate it and see if there's something wrong with Apollo (and so i don't have to spin up an EC2 instance 😅)
@jsjoeio, you can do this if you follow the readme on your code-server, this launch Apollo locally (with AWS).
But you need access key and secret key for aws-cli (on your code server) (it's free for local launch).
Have you access key and secret key ? (if you haven't I can share you the necessary, but by another way than this chat for a minimum of security)
Sorry if my English isn't perfect (I'm French)
Is there a way to launch Apollo locally without AWS? I want to figure out where the problem is coming from.
Sorry if my English isn't perfect (I'm French)
Oh don't worry - I didn't even notice!
Is there a way to launch Apollo locally without AWS? I want to figure out where the problem is coming from.
@jsjoeio I just tried in standalone server mode (without serverless framework - AWS) and it works 😭 The problem occurs when I use the local aws part 😓 started with serverless framework
@jsjoeio When I use serverless framework for local AWS Lambda I have this log :
And when I go to the url https://my-domain/proxy/4001/local/graphql it's work (for the GET) :
and I see my request in the log :
But when I try to use curl on bottom (POST request) of the previous screen I don't see anything on log.
And if I click on "query your server" button, I can't contact the service with a POST request :
you can see red indicator.
Hmm...I wish I could be more helpful but I don't think we'll get to the bottom of this unless we can run Apollo without AWS in the equation. Based on what you've shared, I would bet there is something off about the expected path on Apollo's side. Maybe it's expecting an absolute URL instead of a relative one.
Two other ideas: what does curl
log when you do the POST request?
Also when you're in the browser and see the red indicator, what browser logs do you see? what do you see in the network tab?
@jsjoeio do you think I can call you and share my screen for testing or anything else ?
No, but you could record a screencast and post the video here!
@jsjoeio i have found my mistake ! I have juste an old version of Serverless-offline dependency
Is there an existing issue for this?
OS/Web Information
code-server --version
: 4.7.1Steps to Reproduce
Expected
call url domain/proxy/4001/local/graphql with POST work
Actual
Just get work
Logs
No response
Screenshot/Video
No response
Does this issue happen in VS Code or GitHub Codespaces?
Are you accessing code-server over HTTPS?
Notes
No response