graphql.js icon indicating copy to clipboard operation
graphql.js copied to clipboard

Declaring with template tag and running later

Open nicmosc opened this issue 7 years ago • 1 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

nicmosc avatar Aug 11 '18 15:08 nicmosc

Looks like a nice to have feature.

f avatar Oct 14 '18 00:10 f