f / graphql.js

A Simple and Isomorphic GraphQL Client for JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Declaring with template tag and running later

nicmosc opened this issue · comments

I love this package! We've been using graphql with React for a while now and we have a project where React isn't an option so to connect to our graphql server this is perfect. However we usually first declare our query with the template tag:

const Query = gql`
   query Stuff()...
`

And then run it by calling it.

It would be awesome if we could do the same here, is this something you plan to support? Maybe I misread the doc but from what I saw using this syntax will run the query straight away.

Thanks

Looks like a nice to have feature.