An open API service indexing awesome lists of open source software.

https://github.com/nicolaslopezj/graphql-compiler

Compile .graphql files in Meteor
https://github.com/nicolaslopezj/graphql-compiler

graphql meteor

Last synced: 15 days ago
JSON representation

Compile .graphql files in Meteor

Awesome Lists containing this project

README

        

# GraphQL Compiler

Compiles ```.graphql``` files in Meteor.

```sh
meteor add orionsoft:graphql-compiler
```

In ```Query.graphql```:

```graphql
type Query {
items: [Item]
}
```

In ```index.js```:

```js
import Query from './Query.graphql'

console.log(Query)
```

Log ```index.js```:
```
type Query {
items: [Item]
}
```

So now you can write your graphql schema in ```.graphql``` files and them import them as Strings.