graphql / graphql/graphiql

[graphiql] Syntax highlighting breaks with .graphql as a function

Open
#3,810 5 comments 2 reactions 0 assignees View on GitHub
bug graphiql
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

When using amplify's graphql api capabilities, the syntax highlighting for anything past the graphql function stops working properly. See screenshot. You can see where the if after .graphql() is yellow instead of the purple like previous as well as the const following that if is white instead of navy blue.

![image](https://github.com/user-attachments/assets/66043650-6ebb-458a-9a45-2aba70872d49)

### Expected Behavior

This should affect graphql syntax, but not affect other highlighting after using a .graphql() function.

### Steps To Reproduce

This is in VS Code Insiders 1.96.0 and I'm also using

### Environment

* GraphiQL Version: N/A
* OS: Windows 11
* Browser: N/A
* Bundler: N/A
* `react` Version: 18.2.0
* `graphql` Version: N/A
* `aws-amplify` Version: 6.6.7

### Anything else?

_No response_

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.