gandm / language-babel

ES2017, flow, React JSX and GraphQL grammar and transpilation for ATOM
https://atom.io/packages/language-babel
MIT License
476 stars 83 forks source link

Support GraphQL syntax for empty types #471

Closed cjhowedev closed 6 years ago

cjhowedev commented 6 years ago

GraphQL supports a new syntax for types where you don't include the body. This is because you can use the extend keyword to add fields to that type later.

type Query
type Mutation

This is a common use of it. It currently breaks in GitHub as it is pretty new, but it is part of the GraphQL JS reference implementation. A similar breakage happens with this package, where everything after the first type is unhighlighted. This includes Javascript code after the GraphQL string.

cjhowedev commented 6 years ago

Seems to work great with the latest release! Thanks again!