graphql / graphql/graphiql

[lsp-server] `graphql.vscode-graphql-syntax`: Support Python f-strings

Open
#4,098 0 comments 0 reactions 0 assignees View on GitHub
enhancement lsp-server
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

## Current Behavior (if applicable)

See the following query in Python:

Image

## Desired Behavior

How it looks like without f-strings (not perfect, but good enough, applygin the same style to f-strings would work):

Image

Using f-strings and/or format allows me to statically check that all dynamic parts of the query are passed in (using Ruff or a type-checker)

## Additional context

No graphql configs.

I do consider switching to GraphQL-style variables (`$filter_query`), but then I'd loose helpful static tooling and need to add an extra query parser for variable interpolation.

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.