Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Graphql files are ignored or not supported. #481

Closed
1 of 3 tasks
equinusocio opened this issue Jan 30, 2025 · 6 comments
Closed
1 of 3 tasks

🐛 Graphql files are ignored or not supported. #481

equinusocio opened this issue Jan 30, 2025 · 6 comments
Assignees
Labels
Bug confirmed Report has been confirmed as a valid bug Stable

Comments

@equinusocio
Copy link

equinusocio commented Jan 30, 2025

VS Code version

1.96.4

Extension version

2.3.0

Biome version

1.9.4

Operating system

  • Windows
  • macOS
  • Linux

Description

Same as #378.

The referenced issue has been closed on 4 October 2024 (in a preview release?) but the bug still exist in production today 30 Jan 2025 since the fix is not shipped yet.

When opening .graphql files in vscode the extension is not running (CLI works as expected). Consecutelly, parsing, linting and formatting don't work. See the screenshot below. The server is running and biome works for other files.

Image

Steps to reproduce

  • Install biomejs
  • Install the vsc extension
  • Create a .graphql file and open it
  • See extension ignoring the file
  • Add any typo or parsing error. No warning or errors reported

Expected behavior

As per the doc, the biome should be fully compatible with Graphql, and the CLI works as expected. So we think may be related to this official extension.

Does this issue occur when using the CLI directly?

No

Link to a minimal reproduction

https://github.com/lualtek/biome-repro-1738242624705

Logs

Expand full log

[Trace - 14:21:14] Sending request 'shutdown - (1)'.
[Trace - 14:21:14] Received response 'shutdown - (1)' in 2ms.
No result returned.


[Trace - 14:21:14] Sending notification 'exit'.
No parameters provided.


[Trace - 14:21:14] Sending request 'initialize - (0)'.
Params: {
    "processId": 96711,
    "clientInfo": {
        "name": "Visual Studio Code",
        "version": "1.96.4"
    },
    "locale": "en",
    "rootPath": "/Users/mattia/Workspaces/biome-repro-1738242624705",
    "rootUri": "file:///Users/mattia/Workspaces/biome-repro-1738242624705",
    "capabilities": {
        "workspace": {
            "applyEdit": true,
            "workspaceEdit": {
                "documentChanges": true,
                "resourceOperations": [
                    "create",
                    "rename",
                    "delete"
                ],
                "failureHandling": "textOnlyTransactional",
                "normalizesLineEndings": true,
                "changeAnnotationSupport": {
                    "groupsOnLabel": true
                }
            },
            "configuration": true,
            "didChangeWatchedFiles": {
                "dynamicRegistration": true,
                "relativePatternSupport": true
            },
            "symbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25,
                        26
                    ]
                },
                "tagSupport": {
                    "valueSet": [
                        1
                    ]
                },
                "resolveSupport": {
                    "properties": [
                        "location.range"
                    ]
                }
            },
            "codeLens": {
                "refreshSupport": true
            },
            "executeCommand": {
                "dynamicRegistration": true
            },
            "didChangeConfiguration": {
                "dynamicRegistration": true
            },
            "workspaceFolders": true,
            "semanticTokens": {
                "refreshSupport": true
            },
            "fileOperations": {
                "dynamicRegistration": true,
                "didCreate": true,
                "didRename": true,
                "didDelete": true,
                "willCreate": true,
                "willRename": true,
                "willDelete": true
            },
            "inlineValue": {
                "refreshSupport": true
            },
            "inlayHint": {
                "refreshSupport": true
            },
            "diagnostics": {
                "refreshSupport": true
            }
        },
        "textDocument": {
            "publishDiagnostics": {
                "relatedInformation": true,
                "versionSupport": false,
                "tagSupport": {
                    "valueSet": [
                        1,
                        2
                    ]
                },
                "codeDescriptionSupport": true,
                "dataSupport": true
            },
            "synchronization": {
                "dynamicRegistration": true,
                "willSave": true,
                "willSaveWaitUntil": true,
                "didSave": true
            },
            "completion": {
                "dynamicRegistration": true,
                "contextSupport": true,
                "completionItem": {
                    "snippetSupport": true,
                    "commitCharactersSupport": true,
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "deprecatedSupport": true,
                    "preselectSupport": true,
                    "tagSupport": {
                        "valueSet": [
                            1
                        ]
                    },
                    "insertReplaceSupport": true,
                    "resolveSupport": {
                        "properties": [
                            "documentation",
                            "detail",
                            "additionalTextEdits"
                        ]
                    },
                    "insertTextModeSupport": {
                        "valueSet": [
                            1,
                            2
                        ]
                    },
                    "labelDetailsSupport": true
                },
                "insertTextMode": 2,
                "completionItemKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25
                    ]
                },
                "completionList": {
                    "itemDefaults": [
                        "commitCharacters",
                        "editRange",
                        "insertTextFormat",
                        "insertTextMode"
                    ]
                }
            },
            "hover": {
                "dynamicRegistration": true,
                "contentFormat": [
                    "markdown",
                    "plaintext"
                ]
            },
            "signatureHelp": {
                "dynamicRegistration": true,
                "signatureInformation": {
                    "documentationFormat": [
                        "markdown",
                        "plaintext"
                    ],
                    "parameterInformation": {
                        "labelOffsetSupport": true
                    },
                    "activeParameterSupport": true
                },
                "contextSupport": true
            },
            "definition": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "references": {
                "dynamicRegistration": true
            },
            "documentHighlight": {
                "dynamicRegistration": true
            },
            "documentSymbol": {
                "dynamicRegistration": true,
                "symbolKind": {
                    "valueSet": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        6,
                        7,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        14,
                        15,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21,
                        22,
                        23,
                        24,
                        25,
                        26
                    ]
                },
                "hierarchicalDocumentSymbolSupport": true,
                "tagSupport": {
                    "valueSet": [
                        1
                    ]
                },
                "labelSupport": true
            },
            "codeAction": {
                "dynamicRegistration": true,
                "isPreferredSupport": true,
                "disabledSupport": true,
                "dataSupport": true,
                "resolveSupport": {
                    "properties": [
                        "edit"
                    ]
                },
                "codeActionLiteralSupport": {
                    "codeActionKind": {
                        "valueSet": [
                            "",
                            "quickfix",
                            "refactor",
                            "refactor.extract",
                            "refactor.inline",
                            "refactor.rewrite",
                            "source",
                            "source.organizeImports"
                        ]
                    }
                },
                "honorsChangeAnnotations": false
            },
            "codeLens": {
                "dynamicRegistration": true
            },
            "formatting": {
                "dynamicRegistration": true
            },
            "rangeFormatting": {
                "dynamicRegistration": true
            },
            "onTypeFormatting": {
                "dynamicRegistration": true
            },
            "rename": {
                "dynamicRegistration": true,
                "prepareSupport": true,
                "prepareSupportDefaultBehavior": 1,
                "honorsChangeAnnotations": true
            },
            "documentLink": {
                "dynamicRegistration": true,
                "tooltipSupport": true
            },
            "typeDefinition": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "implementation": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "colorProvider": {
                "dynamicRegistration": true
            },
            "foldingRange": {
                "dynamicRegistration": true,
                "rangeLimit": 5000,
                "lineFoldingOnly": true,
                "foldingRangeKind": {
                    "valueSet": [
                        "comment",
                        "imports",
                        "region"
                    ]
                },
                "foldingRange": {
                    "collapsedText": false
                }
            },
            "declaration": {
                "dynamicRegistration": true,
                "linkSupport": true
            },
            "selectionRange": {
                "dynamicRegistration": true
            },
            "callHierarchy": {
                "dynamicRegistration": true
            },
            "semanticTokens": {
                "dynamicRegistration": true,
                "tokenTypes": [
                    "namespace",
                    "type",
                    "class",
                    "enum",
                    "interface",
                    "struct",
                    "typeParameter",
                    "parameter",
                    "variable",
                    "property",
                    "enumMember",
                    "event",
                    "function",
                    "method",
                    "macro",
                    "keyword",
                    "modifier",
                    "comment",
                    "string",
                    "number",
                    "regexp",
                    "operator",
                    "decorator"
                ],
                "tokenModifiers": [
                    "declaration",
                    "definition",
                    "readonly",
                    "static",
                    "deprecated",
                    "abstract",
                    "async",
                    "modification",
                    "documentation",
                    "defaultLibrary"
                ],
                "formats": [
                    "relative"
                ],
                "requests": {
                    "range": true,
                    "full": {
                        "delta": true
                    }
                },
                "multilineTokenSupport": false,
                "overlappingTokenSupport": false,
                "serverCancelSupport": true,
                "augmentsSyntaxTokens": true
            },
            "linkedEditingRange": {
                "dynamicRegistration": true
            },
            "typeHierarchy": {
                "dynamicRegistration": true
            },
            "inlineValue": {
                "dynamicRegistration": true
            },
            "inlayHint": {
                "dynamicRegistration": true,
                "resolveSupport": {
                    "properties": [
                        "tooltip",
                        "textEdits",
                        "label.tooltip",
                        "label.location",
                        "label.command"
                    ]
                }
            },
            "diagnostic": {
                "dynamicRegistration": true,
                "relatedDocumentSupport": false
            }
        },
        "window": {
            "showMessage": {
                "messageActionItem": {
                    "additionalPropertiesSupport": true
                }
            },
            "showDocument": {
                "support": true
            },
            "workDoneProgress": true
        },
        "general": {
            "staleRequestSupport": {
                "cancel": true,
                "retryOnContentModified": [
                    "textDocument/semanticTokens/full",
                    "textDocument/semanticTokens/range",
                    "textDocument/semanticTokens/full/delta"
                ]
            },
            "regularExpressions": {
                "engine": "ECMAScript",
                "version": "ES2020"
            },
            "markdown": {
                "parser": "marked",
                "version": "1.1.0"
            },
            "positionEncodings": [
                "utf-16"
            ]
        },
        "notebookDocument": {
            "synchronization": {
                "dynamicRegistration": true,
                "executionSummarySupport": true
            }
        }
    },
    "trace": "verbose",
    "workspaceFolders": [
        {
            "uri": "file:///Users/mattia/Workspaces/biome-repro-1738242624705",
            "name": "biome-repro-1738242624705"
        }
    ]
}


[Trace - 14:21:14] Received response 'initialize - (0)' in 1ms.
Result: {
    "capabilities": {
        "positionEncoding": "utf-16",
        "textDocumentSync": 2,
        "codeActionProvider": {
            "codeActionKinds": [
                "quickfix.biome",
                "quickfix.suppressRule",
                "source.fixAll.biome",
                "source.organizeImports.biome",
                "refactor.biome",
                "refactor.extract.biome",
                "refactor.inline.biome",
                "refactor.rewrite.biome"
            ]
        }
    },
    "serverInfo": {
        "name": "biome_lsp",
        "version": "1.9.4"
    }
}


[Trace - 14:21:14] Sending notification 'initialized'.
Params: {}


[Trace - 14:21:14] Received request 'workspace/configuration - (0)'.
Params: {
    "items": [
        {
            "section": "biome"
        }
    ]
}


[Trace - 14:21:14] Sending response 'workspace/configuration - (0)'. Processing request took 0ms
Result: [
    {
        "enabled": true,
        "lspBin": "",
        "searchInPath": true,
        "rename": false
    }
]


[Trace - 14:21:14] Received notification 'window/logMessage'.
Params: {
    "type": 3,
    "message": "Server initialized with PID: 91532"
}


[Trace - 14:21:14] Received request 'client/unregisterCapability - (1)'.
Params: {
    "unregisterations": [
        {
            "id": "biome_did_change_extension_settings",
            "method": "workspace/didChangeConfiguration"
        },
        {
            "id": "biome_range_formatting",
            "method": "textDocument/rangeFormatting"
        },
        {
            "id": "biome_on_type_formatting",
            "method": "textDocument/onTypeFormatting"
        },
        {
            "id": "biome_rename",
            "method": "textDocument/rename"
        },
        {
            "id": "biome_formatting",
            "method": "textDocument/formatting"
        },
        {
            "id": "biome_did_change_workspace_settings",
            "method": "workspace/didChangeWatchedFiles"
        }
    ]
}


[Trace - 14:21:14] Sending response 'client/unregisterCapability - (1)'. Processing request took 0ms
No result returned.


[Trace - 14:21:14] Received request 'client/registerCapability - (2)'.
Params: {
    "registrations": [
        {
            "id": "biome_did_change_extension_settings",
            "method": "workspace/didChangeConfiguration"
        },
        {
            "id": "biome_range_formatting",
            "method": "textDocument/rangeFormatting"
        },
        {
            "id": "biome_on_type_formatting",
            "method": "textDocument/onTypeFormatting",
            "registerOptions": {
                "documentSelector": null,
                "firstTriggerCharacter": "}",
                "moreTriggerCharacter": [
                    "]",
                    ")"
                ]
            }
        },
        {
            "id": "biome_formatting",
            "method": "textDocument/formatting"
        },
        {
            "id": "biome_did_change_workspace_settings",
            "method": "workspace/didChangeWatchedFiles",
            "registerOptions": {
                "watchers": [
                    {
                        "globPattern": "/Users/mattia/Workspaces/biome-repro-1738242624705/biome.json",
                        "kind": 7
                    },
                    {
                        "globPattern": "/Users/mattia/Workspaces/biome-repro-1738242624705/biome.jsonc",
                        "kind": 7
                    },
                    {
                        "globPattern": "/Users/mattia/Workspaces/biome-repro-1738242624705/.editorconfig",
                        "kind": 7
                    },
                    {
                        "globPattern": "/Users/mattia/Workspaces/biome-repro-1738242624705/rome.json",
                        "kind": 7
                    }
                ]
            }
        }
    ]
}


[Trace - 14:21:14] Sending response 'client/registerCapability - (2)'. Processing request took 1ms
No result returned.

@davidrhoderick
Copy link

I can confirm that I am having the same issue. On 2 different Linux machines, Biome version 1.9.4, extension 2.3.0, and VS Code 1.96.4

@nhedger nhedger added Bug confirmed Report has been confirmed as a valid bug Stable and removed Triage labels Jan 31, 2025
@nhedger
Copy link
Member

nhedger commented Jan 31, 2025

Hey, thanks for opening this issue and providing the minimal reproduction. I was able to reproduce it.

We did add GraphQL to 2.x in #252, but it looks like we forgot to publish a new 2.x minor including the changes 🫢. I plan to address it this week-end.

In the meantime, you can switch to the pre-release channel, which does not suffer from the issue.

@nhedger nhedger self-assigned this Jan 31, 2025
@equinusocio
Copy link
Author

equinusocio commented Jan 31, 2025

In the meantime, you can switch to the pre-release channel, which does not suffer from the issue.

Yep this is what we have been using since October, but in our large team we can't tell people to use the pre-release version and on vscode, there is no way to specify recommended extensions with a specific version. Btw the bug should stay open until the fix is shipped on production, to avoid more duplicates.

@nhedger
Copy link
Member

nhedger commented Jan 31, 2025

Done. v2.3.1 fixes this.

@nhedger nhedger closed this as completed Jan 31, 2025
@equinusocio
Copy link
Author

Lovely, thank you!

@nhedger
Copy link
Member

nhedger commented Jan 31, 2025

You're welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug confirmed Report has been confirmed as a valid bug Stable
Projects
None yet
Development

No branches or pull requests

3 participants