graphql-tag-register

0.1.1 • Public • Published

graphql-tag-register

Loads .gql files as graphql-tag at runtime in node Useful in conjunction with react-apollo if you can't use the webpack graphql loader

Usage

require('graphql-tag-register')();

const MyQuery = require('./my-query.gql');

Example

There's a complex example built in !!

# will load ./example.gql
node ./example.js

Package Sidebar

Install

npm i graphql-tag-register

Weekly Downloads

2

Version

0.1.1

License

none

Last publish

Collaborators

  • smirea