graphql / graphiql

GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools.
MIT License
15.97k stars 1.71k forks source link

[vscode-graphql-syntax] The types of a union that has a directive are coloured like a directive #3297

Open AWhetter opened 1 year ago

AWhetter commented 1 year ago

image

The types of union1a and union2a are coloured the same as the directive in the union. Instead, I would expect them to remain coloured as they are in union1b and union2b.

union union1a @deprecated = Int
union union1b = Int
union union2a @deprecated = Int | Float
union union2b = Int | Float
AWhetter commented 1 year ago

Interestingly Github is syntax highlighting these unions in the same way. Perhaps I'm misunderstanding the allowed syntax here?

dimaMachina commented 1 year ago

GitHub uses the same grammars from this repo

as I said https://github.com/graphql/graphiql/issues/3217#issuecomment-1585002248 I would prefer setup image snapshots before fixing some issues

acao commented 1 year ago

@B2o5T there are two open PRs by @AaronMoat regarding this, I would love to have more feedback from you, he presents many excellent options for snapshot testing the grammars