Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I'd love to be able to extract default argument values into constants, so I can:
- avoid "magic values" in the schema
- use the constant default values inside other functions
This is the pattern I'd like to implement:
const schema = gql`
type ImageAsset {
src(
height: Int
width: Int = ${DEFAULT_WIDTH}
): ImageSource!
}
`;
... which unfortunately leads to a parsing error: Syntax Error: Unexpected ")".
Expected Behavior
vscode-graphql
should understand that this is, at the very least, "some default value" (understandable that it probably won't be able to grab the exact value — that would be pretty awesome, though!)
Steps To Reproduce
const schema = gql`
type ImageAsset {
src(
height: Int
width: Int = ${DEFAULT_WIDTH}
): ImageSource!
}
`;
Environment
- VSCode extension `graphql.vscode-graphql` Version: 0.7.5
- OS: MacOS Ventura (13.0 Beta, build 22A5352e)
Anything else?
No response