Any .graghql file that contains a fragment all queries in the same file must utilize it for "Execute Query" to work
- Dominant language
- TypeScript
- Stars
- 16.9k
- Forks
- 1.9k
- Avg merge
- 22h 45m
- Merged PRs (30d)
- 70
Description
## Actual Behavior

See screenshot, GetOrders Query correctly runs, GetOrderIds fails with the error seen to the right
```
{
"errors": [
{
"message": "The specified fragment `OrderFragment` is not used within the current document.",
"extensions": {
"fragment": "OrderFragment",
"specifiedBy": "http://spec.graphql.org/June2018/#sec-Fragments-Must-Be-Used"
}
}
]
}
```
The fragment is being used by the Query GetOrders
## Expected Behavior
GetOrderIds correctly runs
## Steps to Reproduce the Problem Or Description
Create .graphql file and add a fragment and two queries which run against the same api endpoint, one utilises the fragment one does not.
## Specifications
- GraphQL for VSCode Extension Version: 0.3.35
- VSCode Version: 1.64.0
- OS Name: Windows 10
- OS Version: 20H2
- graphql config filename and format example:
schema: http://localhost:5254/graphql?sdl
documents: "src/**/*.{graphql,js,ts,jsx,tsx}"
extensions: {
languageService: {
cacheSchemaFileForLookup: true
},
endpoints: {
default: {
url: " http://localhost:5254/graphql",
},
},
}
## Logs Of TS Server || GraphQL Language Service
NetworkHelper: operation: query
NetworkHelper: endpoint: http://localhost:5254/graphql
Contributor guide
Assessment
This issue has not been assessed yet.