Allow execution of operations without schema
- Dominant language
- TypeScript
- Stars
- 16.9k
- Forks
- 1.9k
- Avg merge
- 22h 45m
- Merged PRs (30d)
- 70
Description
## Actual Behavior
When executing query from within the source code file, I get the error:
```
Error: graphql operation failed t: File '/Volumes/Code/portfolio-tracker-fe/src/App.js' doesn't match any project
```
## Expected Behavior
Execute graphql query correctly.
## Steps to Reproduce the Problem Or Description
1. `npx create-react-app example-react-app && cd example-react-app`
2. `npm i grapqhl-request graphql`
3. add following config to the root of the project (notice I am not defining a schema, because I have no schema files in the project)
```
{
"documents": "src/**/*.{graphql,js,ts,jsx,tsx}",
"extension": {
"endpoints": {
"default": "http://localhost:3001/graphql"
}
}
}
```
4. modify `App.js` to include
```
import { gql } from 'graphql-request';
const query = gql`
{
SomeType {
someField
}
}
`;
```
5. Try executing the query
## Specifications
- GraphQL for VSCode Extension Version: v0.3.41
- VSCode Version: 1.63.0 Commit: 7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e
- OS Name: macOS
- OS Version: 12.0.1
- graphql config filename and format example: graphql.config.json (see above for content)
## Logs Of TS Server || GraphQL Language Service
```
Error: graphql operation failed
t: File '[...]/example-react-app/src/App.js' doesn't match any project
```
Contributor guide
Assessment
This issue has not been assessed yet.