Home > front end >  What is the file extension for graphql queries?
What is the file extension for graphql queries?

Time:02-02

since graphql queries are text, I'd like to just store them in a separate file, but I'm not finding any language support. gql files are for schema, not queries.

What's the vs code support for graphql queries?

  • What file extension is the convention if one is going to store queries in a file?
  • Is query syntax highlighting / intellisense (based on schema) possible?
  • can I import the query? What I tried:

I put the query in a .gql file, no luck.

CodePudding user response:

The file extension is .graphql and the loading can be handled by WebPack.

documentation

  • Related