apollographql / apollographql/apollo-tooling

vscode extension doesn't works with graphql modules

Open
#1,815 0 comments 3 reactions 0 assignees View on GitHub
:spiral_notepad: component - vscode
Dominant language
TypeScript
Stars
3k
Forks
460
PR merge metrics
No merged PRs in 30d

Description

**Intended outcome:**
Using graphql-modules and Typescript with different schema.graphql files, extension should not give error "Type "Query" already exists in the schema. It cannot also be defined in this type definition"

**Actual outcome:**
![Selection_139](https://user-images.githubusercontent.com/1449365/75604403-fc486b00-5ae0-11ea-976b-3ca4ee2a54d1.png)

**How to reproduce the issue:**
I have the following apollo.config.js
```nodejs
module.exports = {
client: {
service: {
name: "microservices-gateway"
}
}
};
```
Folder structure
```bash
src
├── index.ts
└── modules
├── app.ts
└── greeting
├── greeting.provider.ts
├── index.ts
├── resolvers.ts
└── schema.graphql
```
I have tried to use `excludes` or `includes`, doesn't seems to work

**Versions**
apollo@2.24.0

Contributor guide

Open the contributing guide

Research direction

Reproduce the error with the shown apollo.config.js, the TypeScript folder structure, and separate schema.graphql files. Start by tracing how the VS Code extension discovers schemas and applies includes or excludes; done means graphql-modules schemas no longer produce the duplicate Query error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.