# ember-cli-graphql-file

> An addon to precompile your `.graphql` files with `graphql-tag` and turn them into importable modules.

Latest version **0.0.1** (published 2017-02-06) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install ember-cli-graphql-file
pnpm add ember-cli-graphql-file
yarn add ember-cli-graphql-file
bun add ember-cli-graphql-file
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2017-02-06 |
| First published | 2017-02-06 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6.9.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Charles Demers |
| Maintainers | mirego-dev |
| Keywords | ember-addon, graphql, graphql-tag |

## Links

- npm: https://www.npmjs.com/package/ember-cli-graphql-file
- Repository: https://github.com/mirego/ember-cli-graphql-file
- Homepage: https://github.com/mirego/ember-cli-graphql-file#readme
- Issues: https://github.com/mirego/ember-cli-graphql-file/issues
- npm.io page: https://npm.io/package/ember-cli-graphql-file

## Dependencies (2)

- [graphql-tag](https://npm.io/package/graphql-tag.md) 1.2.4
- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) 5.2.2

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2017-02-06

## README

# ember-cli-graphql-file

An addon to precompile your `.graphql` files with [graphql-tag](https://github.com/apollographql/graphql-tag) and turn them into importable modules.

## Installation

```
$ ember install ember-cli-graphql-file
```

## Usage

__Put your GraphQL query in a file__

```graphql
# app/graphql/query.graphql

query {
  hero {
    name

    friends {
      name
    }
  }
}
```

__Import it from JS to execute it with Apollo__

```js
import Ember from 'ember';
import query from 'my-app/graphql/query';

export Ember.Route.extend({
  apollo: Ember.inject.service(),

  model() {
    return this.get('apollo').query({query});
  }
});
```

---
_Source: https://npm.io/package/ember-cli-graphql-file · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
