Multi-project config file not working for schema introspection
- Dominant language
- TypeScript
- Stars
- 16.9k
- Forks
- 1.9k
- Avg merge
- 22h 45m
- Merged PRs (30d)
- 70
Description
I want to use multiple GraphQL endpoint on single project, but this extension seems load only one (first) project even if multiple project exists on `graphql.config.yml`.
Here's example, only 3 files on directory.
Open the directory with VSCode that installed this extension.
**graphql.config.yml**
```yml
projects:
rickandmortyapi:
schema: https://rickandmortyapi.com/graphql
spaceX:
schema: https://api.spacex.land/graphql/
```
**spacex.graphql**
```graphql
query getUsers {
users {
id
name
}
}
query getDragons {
dragons {
id
name
}
}
```
**rickandmorty.graphql**
```graphql
query getCaracters {
characters {
results {
name
}
}
}
query getLocations {
locations {
results {
name
}
}
}
```
In above case, `rickandmorty.graphql` is perfectly validated and auto completed but `spacex.graphql` throws validation error.
> Cannot query field "users" on type "Query"
Yes, I know it is difficult to find proper project for each `.graphql` file automatically. So is there any way to assign specific project to each `.graphql` file? Can I find some reference about this anywhere?
If there's no way so far, I want feature like this.
**spacex.graphql**
```graphql
#[[spaceX]]
query getUsers {
users {
id
name
}
}
query getDragons {
dragons {
id
name
}
}
```
**rickandmorty.graphql**
```graphql
#[[rickandmortyapi]]
query getCaracters {
characters {
results {
name
}
}
}
query getLocations {
locations {
results {
name
}
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.