apollographql / apollographql/vscode-graphql

Support multiple schema sources

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

Description

Currently, the VS Code Apollo extension and Apollo CLI support defining only a single schema/service in the `apollo.config.json` file.

In projects that consume multiple GraphQL APIs (for example, `main-api` and `analytics-api`), we need to maintain separate config files like:
- `apollo.config.main.json`
- `apollo.config.analytics.json`

It would be helpful to support multiple schema sources or clients within a single config file, something like:

```json
{
"clients": [
{
"includes": [
"./src/apollo/fragments/**",
"./src/apollo/queries/**/*.{gql,graphql}",
"./src/apollo/mutations/**/*.{gql,graphql}"
],
"name": "main-api",
"service": { "url": "https://example.com/graphql" }
},
{
"includes": [
"./src/apollo/analytics/fragments/**",
"./src/apollo/analytics/queries/**/*.{gql,graphql}",
"./src/apollo/analytics/mutations/**/*.{gql,graphql}"
],
"name": "analytics-api",
"service": { "url": "https://analytics.example.com/graphql" }
}
]
}

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how the VS Code extension and Apollo CLI read and validate apollo.config.json, focusing on their current single-schema or single-service assumptions. Compare the proposed clients structure with existing configuration behavior, then define tests for two named clients with separate includes and service URLs; done means both tools can discover and process multiple schema sources from one config file.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, typescript
Domain
api, devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.