You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I'm using a template string to add in locale directives to a query/mutation, it gives me an error of "'@' or '{' expected, got '$'".
// This example has the function type removed and a // string type added to the locale parameter, this is to // make it possible to paste into your IDE.constPOLICY_PAGE_QUERY=(locale: string)=>`#graphql query PolicyPageQuery($handle: String!) ${locale} { policy: metaobject(handle: { handle: $handle, type: "policies" }) { title: field(key: "title") { value } content: field(key: "content") { value } updatedAt } }`;
This causes other errors within the query as well, as gql variables are described as both unused and undefined.
To Reproduce
Paste the above into a typescript document within Webstorm with the plugin enabled. The error will appear.
Expected behavior
The IDE should ignore the existence of the template string.
Screenshots
Version and Environment Details
Operation system: Windows 11 64bit
IDE name and version: WebStorm 2024.2.2
Plugin version: 242.21829.3
Additional context
This is being used to add locale directives to Shopify Storefront API requests. I am currently on a trial of WebStorm and this is the only thing stopping me from swapping over from VS Code.
The text was updated successfully, but these errors were encountered:
Describe the bug
When I'm using a template string to add in locale directives to a query/mutation, it gives me an error of "'@' or '{' expected, got '$'".
This causes other errors within the query as well, as gql variables are described as both unused and undefined.
To Reproduce
Paste the above into a typescript document within Webstorm with the plugin enabled. The error will appear.
Expected behavior
The IDE should ignore the existence of the template string.
Screenshots
Version and Environment Details
Operation system: Windows 11 64bit
IDE name and version: WebStorm 2024.2.2
Plugin version: 242.21829.3
Additional context
This is being used to add locale directives to Shopify Storefront API requests. I am currently on a trial of WebStorm and this is the only thing stopping me from swapping over from VS Code.
The text was updated successfully, but these errors were encountered: