graphiql icon indicating copy to clipboard operation
graphiql copied to clipboard

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

Open Avasam opened this issue 3 months ago • 0 comments

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.

Avasam avatar Aug 31 '25 20:08 Avasam