graphql / graphql/graphiql

Python Language Server conflicting with GraphQL extension

Open
#2,342 2 comments 1 reaction 0 assignees View on GitHub
vscode-graphql
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

Hello, I am x-posting [this issue](https://github.com/microsoft/vscode-python/issues/14825) for visibility. Thanks!

## Environment data

- VS Code version: 1.51
- Extension version (available under the Extensions sidebar): v2020.11.371526539
- OS and version: macOS 10.15 Catalina
- Python version (& distribution if applicable, e.g. Anaconda): Anaconda Python 3.8
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
- Relevant/affected Python packages and their versions: N/A
- Relevant/affected Python-related VS Code extensions and their versions: graphql-0.13.12
- Value of the `python.languageServer` setting: true

## Expected behaviour

Execute GraphQL queries to a remote endpoint successfully, inside of a multi-root, multi-language workspace.

![image](https://user-images.githubusercontent.com/960210/100291632-f1bde380-2f43-11eb-8f63-fa46f71673cc.png)

## Actual behaviour
Installing and running this extension inside of my Python Workspace with the listed configuration generates the following error

```
ERR name must not be falsy: Error: name must not be falsy
at Function.validate (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:524:978)
at new C (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:524:927)
at new C (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:511:436)
at asSymbolInformation (/Users/user/.vscode/extensions/graphql.vscode-graphql-0.3.12/node_modules/vscode-languageclient/lib/protocolConverter.js:383:22)
at /Users/user/.vscode/extensions/graphql.vscode-graphql-0.3.12/node_modules/vscode-languageclient/lib/protocolConverter.js:372:42
at Array.map ()
at Object.asSymbolInformations (/Users/user/.vscode/extensions/graphql.vscode-graphql-0.3.12/node_modules/vscode-languageclient/lib/protocolConverter.js:372:23)
at /Users/user/.vscode/extensions/graphql.vscode-graphql-0.3.12/node_modules/vscode-languageclient/lib/client.js:1005:62
```

The errors do not appears to be from the Language Server, but googling for the error itself yields only issues related to the Python Language Server. I am able to run the graphql extensions inside a single language, non multi-root workspace (From my screenshot above). [Search Reference](https://www.google.com/search?client=firefox-b-e&q=%22ERR+name+must+not+be+falsy%3A+Error%3A+name+must+not+be+falsy%22)

## Steps to reproduce:

* Create a multi-root workspace
* Initialize the Python Language Server
* Install graphql from the Extensions marketplace
* Configure GraphQL with a remote or local schema
* Create a query file
* Run 'Execute Query'
* The query window will return an empty screen instead of data.
![image](https://user-images.githubusercontent.com/960210/100292148-4a41b080-2f45-11eb-860e-0ce143aaeab4.png)

## Logs
* This is a work computer, please DM me on twitter for more logging :)

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.