Skip to content
This repository has been archived by the owner on Jul 31, 2022. It is now read-only.

graphql as tagged template #49

Closed
azdanov opened this issue Jul 9, 2018 · 4 comments
Closed

graphql as tagged template #49

azdanov opened this issue Jul 9, 2018 · 4 comments

Comments

@azdanov
Copy link

azdanov commented Jul 9, 2018

Is there a way to use graphql template tag instead of gql?

I am trying out gatsby.js which uses relay for it queries.

Edit:
I tried import { graphql as gql } from 'graphql-relay'; but it doesn't seem to validate against a pre generated schema.

screen shot 2018-07-09 at 07 18 19

Similar query using intellij-graphql:

screen shot 2018-07-09 at 07 19 45

@divyenduz
Copy link
Collaborator

This can be achieved in the following two ways

  1. Adding graphql to the list of supported tags here

  2. Making this list configurable by editor settings.

I will see if this can be picked up shortly.

@rdrey
Copy link

rdrey commented Jul 28, 2018

Thanks @divyenduz

I'm running 0.0.10 now and see the little 🔌 GraphQL in the status bar and the GraphQL Language server starts, but I don't get any completions in my snippets yet. I can run the extension.isDebugging command and it logs false.

Is there a step I'm missing or an easy way to enable more debugging?

@rdrey
Copy link

rdrey commented Jul 28, 2018

Heh, silly me. Just looked at the source and realised that your fix isn't released yet. Ran into another problem, but will report it separately.

@divyenduz
Copy link
Collaborator

This is released in 0.1.4 (which is a preview release with CodeLens feature as well) 🎉

Feedback please 👍👇

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants