graphql / graphql/graphiql

Field coloring varies based on newlines

Open
#2,354 8 comments 3 reactions 0 assignees View on GitHub
bug good first issue grammar vscode-graphql vscode-graphql-syntax
Dominant language
TypeScript
Stars
16.9k
Forks
1.9k
Avg merge
22h 45m
Merged PRs (30d)
70

Description

## Actual Behavior
Field coloring varies depending whether the opening brace or directive is on the same line as the type definition. Especially in more complex cases (the Bar example below) it may be preferable to have directives on their own lines.

See `field: String` below:

Screenshot 2019-05-06 at 14 33 44

## Expected Behavior
Colors don't change based on locations.

## Steps to Reproduce the Problem Or Description
Example code from screenshot:

```
type Foo1 {
field: String
}

type Foo2
{
field: String
}

type Bar1 @auth(rules: [
{ allow: groups, groups: ["Admin"] }
{ allow: groups, groups: ["Everyone"], operations: [read] }
]) {
field: String
}

type Bar2
@auth(rules: [
{ allow: groups, groups: ["Admin"] }
{ allow: groups, groups: ["Everyone"], operations: [read] }
]) {
field: String
}
```
## Specifications

- GraphQL for VSCode Extension Version: 0.1.7
- VSCode Version: 1.32.3
- OS Name: macOS
- OS Version: Mojave

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.