apollographql / apollographql/vscode-graphql

Version 2.00+ Doesn't work with service and .js config file.

Open
#239 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
78
Forks
23
PR merge metrics
No merged PRs in 30d

Description

My Apollo vscode extention doesn't work using newer versions.

I've created a config file looking like this: (apollo.config.js)

`module.exports = {
client: {
localSchemaFile: "./schema.graphql",
service: {
name: "datocms-test",
url: "",
headers: {
authorization: "Bearer ",
},
},
includes: [ "./queries/**/*.gql",],
},
};
`

If i use version 2.00 + the vscode extension gives me this error:
Service stats could not be loaded. This may be because you're missing an apollo.config.js file or it is misconfigured. For more information about configuring Apollo projects, see the guide here (https://go.apollo.dev/t/config).

![image](https://github.com/user-attachments/assets/b12b54f4-fa1d-4526-92b6-dcf83432f77e)

And if I use 1.20.0 it works without changing the config file.
![image](https://github.com/user-attachments/assets/3d60b048-6fd7-465c-a65d-7b4f3f9a36c9)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure in the vscode-graphql extension with the provided apollo.config.js, comparing version 1.20.0 with version 2.00 or newer. Start by tracing how the extension reads the service configuration and loads service stats; done means the newer version accepts this configuration and loads the service without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.